+ 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
4 Answers
+ 2
Do you mean the syntax errors or the bugs?
+ 2
yes, code doesn't give the correct output
+ 2
yes, code doesn't give the correct output
+ 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