+ 2

Is this code right? Help me to find the wrong.

This code is to find the prime numbers in the range (100,201) https://code.sololearn.com/cbT9w394F34I/?ref=app

19th Nov 2017, 12:44 PM
SACHIN JOSEPH
4 odpowiedzi
+ 2
Do you mean the syntax errors or the bugs?
19th Nov 2017, 12:58 PM
Jonas Schröter
Jonas Schröter - avatar
+ 2
yes, code doesn't give the correct output
19th Nov 2017, 1:11 PM
SACHIN JOSEPH
+ 2
yes, code doesn't give the correct output
19th Nov 2017, 1:12 PM
SACHIN JOSEPH
+ 2
First, you must not declare booleans like Strings: bool = "True" --> Wrong bool = True --> Correct Second, you have to check if i is divisible by j And then you have a problem with i / 2 which returns float: https://code.sololearn.com/c4Srd3se0U88/?ref=app
19th Nov 2017, 1:22 PM
Jonas Schröter
Jonas Schröter - avatar