Advertisement
Spocoman

02. Prime Number Checker

Jan 20th, 2022
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. number = int(input())
  2. is_simple = "True"
  3. for i in range(2, number):
  4.     if number % i == 0:
  5.         is_simple = "False"
  6.         break
  7. print(is_simple)
  8.  
  9.  
  10. Тарикатско решение:)
  11.  
  12. n = int(input())
  13. print("False" if n % 2 == 0 or n % 3 == 0 or n % 5 == 0 or n % 7 == 0 else "True")
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement