mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
all valid python 3
This commit is contained in:
@ -16,7 +16,7 @@ def isprime(n):
|
||||
if(n%i==0):
|
||||
return False
|
||||
return True
|
||||
n = int(raw_input())
|
||||
n = int(input())
|
||||
i=0
|
||||
j=1
|
||||
while(i!=n and j<3):
|
||||
@ -27,4 +27,4 @@ while(i!=n):
|
||||
j+=2
|
||||
if(isprime(j)):
|
||||
i+=1
|
||||
print(j)
|
||||
print(j)
|
||||
|
@ -4,7 +4,7 @@ def isprime(number):
|
||||
if number%i==0:
|
||||
return False
|
||||
return True
|
||||
n = int(raw_input('Enter The N\'th Prime Number You Want To Get: ')) # Ask For The N'th Prime Number Wanted
|
||||
n = int(input('Enter The N\'th Prime Number You Want To Get: ')) # Ask For The N'th Prime Number Wanted
|
||||
primes = []
|
||||
num = 2
|
||||
while len(primes) < n:
|
||||
|
Reference in New Issue
Block a user