How to type input in code playground if program requires inputs at different time (like after few statements) ? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How to type input in code playground if program requires inputs at different time (like after few statements) ?

As we have to type input separated by spaces if two input is required simultaneously. but what if inputs are in different statement?

13th Nov 2018, 4:42 PM
Elliot
Elliot - avatar
1 ответ
+ 4
You can type every input value in different lines (press Enter after each value). So for example (in Python): n=input() if n=="n": i=input() print(i) else: print("nope") If you enter: n 12 The output will be 12 otherwise "nope" (I hope this answers your question)
13th Nov 2018, 6:09 PM
Uni
Uni - avatar