0
Can Anyone Help It's Showing Error In 2nd Line
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")
2 odpowiedzi
0
BISHAL MONDAL
You forgot to close the bracket in line1
0
you did not close the parenthesis for float(input()...
and you should be casting it as an integer if you are using it for range
so:
num = int(input())
But these are technical details, the result you get is still not very useful.
Run the code and see...
you could put break at the end of both the if and the else statements.