Guest User

Untitled

a guest
Dec 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. print ( "Prime number program ")
  2. user_input = input ( " Enter a number greater than 1 - ")
  3. user_input = int(user_input)
  4.  
  5. for i in range ( 2, user_input):
  6. if user_input % i == 0:
  7. print ( user_input, " is not a prime number")
  8. print ( "it is divisible by", i)
  9. break
  10. else:
  11. print ( user_input, "is a prime number")
Add Comment
Please, Sign In to add comment