0

Can anyone explain y i can't execute this code

python , while loops https://code.sololearn.com/cb6BjQ38Eyo6/?ref=app

21st May 2018, 8:05 PM
hemanth devulapally
hemanth devulapally - avatar
5 Answers
+ 6
The loop condition is False, so the loop doesn't even start. Look carefully why it's like that -- the variable s is definitely not "larger or equal to" 40 at program start... ;)
21st May 2018, 8:09 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 3
because s=2 and youre saying:: if s>=40 which never evaluates to true
21st May 2018, 8:08 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
While Kuba and Brains are correct about the conditional, you also must remember that indentation is used to show the start and the end of a code block. Referring to the last print statement
21st May 2018, 8:57 PM
ODLNT
ODLNT - avatar
+ 1
thank you 😊 Charles Comer
22nd May 2018, 6:46 PM
hemanth devulapally
hemanth devulapally - avatar
0
thank you😊😊 Brains and Kuba SiekierzyƄski
21st May 2018, 8:18 PM
hemanth devulapally
hemanth devulapally - avatar