Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
number_to_check = int(input("n (>=2): "))
is_prime = True
for divisor in range(2, number_to_check):
if number_to_check % divisor == 0:
is_prime = False
break
if is_prime:
print("prime")
else:
print("not prime")