is there a way to get 2 inputs in sololearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

is there a way to get 2 inputs in sololearn?

Is there?

14th Jan 2018, 10:10 AM
Mohammad Khani
Mohammad Khani - avatar
9 Answers
+ 6
Mohammad there is nothing wrong with your code you just need to press enter after string input and then enter your number of loops on the next line and press run ☺ like so... 1st line input hello (press enter) 2nd line input 3 (press run) output hello hello hello
14th Jan 2018, 10:54 AM
D_Stark
D_Stark - avatar
+ 16
yes , u can take any number of inputs ... 1) use a loop & array 2) or use as many variables as u need to store each input //thats for non-web ☺
14th Jan 2018, 10:24 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 6
you can give any number of input but you have to give all inputs at same time by pressing enter
14th Jan 2018, 10:19 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 5
if its for non web then yes you can have multiple inputs but only one output when you run the program again your previous inputs are forgotten.
14th Jan 2018, 10:18 AM
D_Stark
D_Stark - avatar
+ 5
asking questions is how you learn and your welcome 😉
14th Jan 2018, 11:01 AM
D_Stark
D_Stark - avatar
+ 5
yea martin is right you can keep it on the same line also as you have used next() which dosent read spaces 👍
14th Jan 2018, 7:14 PM
D_Stark
D_Stark - avatar
0
the what is the problem with this? https://code.sololearn.com/cKoeSoa6E7F2/?ref=app
14th Jan 2018, 10:44 AM
Mohammad Khani
Mohammad Khani - avatar
0
ow my gosh 😂😂😂😂 now i see my problem 😂😂❤ how silly my question was thank you every one.
14th Jan 2018, 10:55 AM
Mohammad Khani
Mohammad Khani - avatar
0
❤❤❤❤❤❤
14th Jan 2018, 11:02 AM
Mohammad Khani
Mohammad Khani - avatar