Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
number1 = int(input("Enter starting number "))
number2 = int(input("Enter ending number "))
for number in range(number1,number2+1):
is_prime = True
for index in range(2,number//2):
if number%index != 0:
print(f"{number} is prime")
### fix
number1 = int(input("Enter starting number "))
number2 = int(input("Enter ending number "))
for number in range(number1,number2+1):
is_prime = True
for index in range(2,number//2+1):
if number%index == 0:
is_prime = False
break
if is_prime:
print(number)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment