SHARE
TWEET

Untitled

a guest Apr 24th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top