+ 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

6th Aug 2018, 5:51 AM
Abhay rana
Abhay rana - avatar
6 Respuestas
+ 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)
6th Aug 2018, 6:21 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
bro can you give me this solution without using a function because i dont complete yet function topic
6th Aug 2018, 8:04 AM
Abhay rana
Abhay rana - avatar
0
You want to make a lot of money
6th Aug 2018, 11:15 PM
songgei
songgei - avatar
0
??
7th Aug 2018, 6:00 AM
Abhay rana
Abhay rana - avatar
0
by selling primes ? :-))
7th Aug 2018, 6:24 AM
VcC
VcC - avatar