How do i use Input? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How do i use Input?

When i do for example: Name = input('enter your name: ') Print('hello', Name) It just prints 'enter your name: ' instead of what my input is, what can i do?

9th Jul 2017, 11:59 PM
James
1 Answer
+ 8
In code playground, input/output are handled in a special way, as code is ran on server side... That's why a pop-up ask you for ALL inputs required for your script when you click on the 'run' button. Providing many user inputs at this time works (each line of the unique starting input will be dispatch to the script one by one when need), but is not displayed in the returned output ^^ In your specific case (and at code playground), you must provide your answer in the pop-up box, and mainly change 'Print' to 'print' (no capitals/uppercase), and the output will be something like: enter your name: hello James Not the input aside the first sentence, as you doesn't type it in real-time but is simultated ;)
10th Jul 2017, 5:41 AM
visph
visph - avatar