Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/usr/bin/env/python3
  2. #Sprawdzic czy zadana liczba calkowita n jest liczba pierwsza
  3.  
  4. n=int(input('Podana liczba:'))
  5. isPrime = True
  6. for i in range (2,n):
  7. if n%i==0:
  8. isPrime = False
  9. break
  10.  
  11. if isPrime:
  12. print("Jest pierwsza")
  13. else:
  14. print("Nie jest pierwsza")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement