0

write a program to input a number and check if the number is prime or not

27th Jul 2021, 6:17 AM
Biswajit Nayak
Biswajit Nayak - avatar
3 odpowiedzi
+ 15
Checking prime or not is very basic coding specially in python 😀 I think you should attempt it by yourself But for help you can see this https://code.sololearn.com/cPDD3i44SXVa/?ref=app https://code.sololearn.com/c6Wbmle0X7O2/?ref=app
27th Jul 2021, 6:28 AM
SωAti
SωAti - avatar
+ 3
Why?
27th Jul 2021, 6:27 AM
The future is now thanks to science
The future is now thanks to science - avatar
0
Logic:- Any prime number is of the form:- 6n + 1 Where n is any natural number.
27th Jul 2021, 6:45 AM
Carlos
Carlos - avatar