Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env/python3
- #Sprawdzic czy zadana liczba calkowita n jest liczba pierwsza
- n=int(input('Podana liczba:'))
- isPrime = True
- for i in range (2,n):
- if n%i==0:
- isPrime = False
- break
- if isPrime:
- print("Jest pierwsza")
- else:
- print("Nie jest pierwsza")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement