0

Why this code prints the output 2 times?

This is a Python code which receives an integer and tell u if this number is Prime or not... But this code prints "not prime" 2 times... Why???? https://code.sololearn.com/cKxpMhNbkv9t/?ref=app

16th Oct 2022, 3:33 AM
Amateur
2 Answers
+ 4
Because there is no break so if else part may execute many times
16th Oct 2022, 4:50 AM
AĶ¢J
AĶ¢J - avatar
+ 1
AĶ¢J Thank u
16th Oct 2022, 8:02 AM
Amateur