You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
num = 407
# To take input from the user
#num = int(input("Enter a number: "))
if num == 1:
print(num, "is not a prime number")
elif num > 1:
# check for factors
for i in range(2,num):
if (num % i) == 0:
print(num,"is not a prime number")
print(i,"times",num//i,"is",num)
break
else:
print(num,"is a prime number")
# if input number is less than
# or equal to 1, it is not prime
else:
print(num,"is not a prime number")
Environment
Test steps
Expected result
Actual result
Syntax highlighting is not correct:
The code after comment tag "#" is treated as comment as well
Others
Please let me know if more verifications required and thanks for the assistance.
The text was updated successfully, but these errors were encountered: