+ 1

Guys how to find prime no. between 0 to 100 using python?

27th Jun 2018, 6:43 AM
Sunil Chettri
Sunil Chettri - avatar
4 Antworten
+ 13
can you please show your try first then everyone try to help you out else it looks like you only depend on community instead of trying first so first show your try then anyone try to help you out
27th Jun 2018, 6:49 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 9
Best would be to make a loop and check for each number if any of the numbers between 2 and the square root of self is a divisor (modulo of the division equals zero).
27th Jun 2018, 6:49 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
Here's my code using lambdas... https://code.sololearn.com/cXmS8ghAVToX/?ref=app
27th Jun 2018, 9:54 AM
Christopher
Christopher - avatar