+ 2
Can Anyone Help? It's Showing Error
num = float(input("What is your number: ?") for i in range(2, num): if (num % i) == 0: print("This number is not prime") else: print("This number is prime")
5 odpowiedzi
+ 1
The argument of the range function would be an integer, but you passed a float.
num = int(input("What is your number: ?")
+ 1
You forgot the closing parentheses in your float. But float is also incorrect because you are working with prime numbers and therefore should be using int(....) not float(....).
You also have improper indentation starting in line 2. python uses indentation to identify code blocks.
+ 1
BISHAL MONDAL Your first line of code is missing a second closing bracket.
0
Then Also It's Showing Error