more than one input? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

more than one input?

Hello, Im very new to this and I have got a question. until now i have been able to code little programs with one imput premped at the start that gives me an answer at the end. My question is: how can I, after the first answer(given from the first imput), ask for another input from the user to continue the story? thank you for your help. if you need any more detail ask !

19th Feb 2019, 11:27 AM
michele fresneda
michele fresneda - avatar
2 Answers
+ 1
You can take inputs successively, and it works just the way you would imagine. Problem is: It doesn't work on Sololearn, because we have not a real interactive mode going here. Your code is sent to Sololearn, is run there, and what you see here is only a copy of the output.
19th Feb 2019, 11:38 AM
HonFu
HonFu - avatar
+ 1
Unfortunately, in Sololearn you have to give all input in advance. You can separate multiple inputs by using multiple lines. e.g. for x = input() y = input() you have to type 3 5 to assign 3 to x and 5 to y
19th Feb 2019, 11:39 AM
Matthias
Matthias - avatar