how do i do multiple inputs in one program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how do i do multiple inputs in one program?

I've been testing the "simple calculator" code, and it turns out i can input only one input per program. is there any way to input multiple different inputs in one program?

18th Jun 2021, 5:50 PM
Abdullah Yousif
5 Answers
+ 2
https://code.sololearn.com/WhiNb9BkJUVC
19th Jun 2021, 2:00 AM
David Ashton
David Ashton - avatar
+ 1
by calling input() multiple times! can you please show you code?
18th Jun 2021, 5:54 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 1
Yes it is possible. when you have multiple inputs, you can enter the next value on a new line. the best way is to install the IDE, write the code there and practice. IDE is your best friend)
18th Jun 2021, 5:58 PM
SammE
SammE - avatar
0
num1 = int(input()) num2 = int(input()) print(int(num1) + int(num2))
18th Jun 2021, 6:04 PM
Abdullah Yousif