0
How to use the "input" command in python?
Hello everyone. I'm actually learning python and I was trying to code something in the playground. The thing is that I have some trouble to get the input command working. I'm trying to do something that looks like this: a = input("enter a number :") The thing is that it asks for it when I launch the code but not when the line arrives. So because this same input arrives multiple times in the code (it is in a while loop), a problem occurs because I cannot enter anything. Thanks for helping me !
2 Answers
+ 8
That's a limitation of Code Playground. Input has to be fed to the interpreter prior to running the code, and this does not reflect the actual code on desktop. Due to this issue, input won't work well with loops on Code Playground.
0
Too bad... That's kind of a problem that is pretty annoying. I hope this will be changed one day.