+ 1
While loop with input dont work
Why we can't use input in while loop in this Python editor ? https://sololearn.com/compiler-playground/cNWJGrt4NYMC/?ref=app
4 ответов
+ 3
Corentin Dos Santos you have to put all the input() in at the beginning... Sololearn does use an interactive environment...
+ 6
Corentin Dos Santos ,
the code is working properly (well done!), except the fact that sololearn is not working interactively.
just a hint how we make the code a bit more efficient:
since we only use the randint() method in the program, we do not need to import the complete random module by using
from random import *
we can use:
from random import randint # only the randint() function is imported.
this is saving some memory and execution time.
+ 2
Thanks you, so i can't use Sololearn for this application
+ 1
Ok thanks you for the tip !