+ 1
Is this tye correct python code for prime no?
2 Answers
+ 3
Here is another example. You just need to iterate until the square root of the input number
https://code.sololearn.com/crZkkz38H2Ts/?ref=app
+ 1
Not really. That's not the definition of a prime number, and you don't really need an else statement. Here's the fixed code:
https://code.sololearn.com/clzXZZNnMOta/?ref=app