+ 2
write a python script to print next prime number of a given number.
i want to do it from loop and simple method not from function
6 Respostas
+ 4
a=int(input()) #first prime
def isprime(n):
for i in range(sqrt(n)+1):
if n%i==0:return False
return True
while (not isprime(a)):a+=1
print(a)
0
bro can you give me this solution without using a function because i dont complete yet function topic
0
You want to make a lot of money
0
??
0
by selling primes ? :-))