0

Why do I get no input in these code ?

https://code.sololearn.com/chGOzMRYl8v0/?ref=app

27th Jul 2020, 7:09 PM
Ifham Khwaja
6 Answers
+ 5
Because you did not use input() function. You set var "i" to a fixed value (4). instead of this, you could use: i = int(input('enter a number:')) If you enter a number greater than 7, program is running in an infinite loop.
27th Jul 2020, 7:12 PM
Lothar
Lothar - avatar
+ 1
Ifham Khwaja Take care of indentation i = 4 while True: i = i + 1 if i == 5: print(" 7 is power") continue if i == 8: print (" 8 is over") break print (i) print ("Finished")
27th Jul 2020, 7:14 PM
David
+ 1
Ifham Khwaja David is right. Indentation is the issue here. Use the tab option for indentation instead of adding space manually.
27th Jul 2020, 7:21 PM
Tomiwa Joseph
Tomiwa Joseph - avatar
0
Thank you
27th Jul 2020, 7:20 PM
Ifham Khwaja
0
No Input for the query INSERT INTO Animals VALUES('Slim','Giraffe','1'); as this is correct query i am writing
21st Feb 2022, 5:08 AM
Nayanananda S M