0

How to enter 2 inputs to get 2 outputs?

a = int(input('125')) b = int(input('268')) print(a*20/100) print(b*20/100)

8th Jun 2021, 10:14 AM
Ajay Reddy
2 odpowiedzi
+ 3
Ajay Reddy , the expression you have put inside the input() function , will only be displayed as a prompt for the user. so it makes more sense to give a short prompt that the user can understand. the issue is, that you can not see the prompt in sl playground. but you have to input 2 values in the input window, each of them in a separate line. if you are working on a local installation, you will be prompted twice to give your input. so your code could be: a = int(input('first number: ')) b = int(input('second number :')) print(a) print(b) print((a *3) + (b / 2)) # or what ever you like to calculate
8th Jun 2021, 10:58 AM
Lothar
Lothar - avatar
- 1
Clear your question. Anyway let me try to tell you input1 = input() input2 = input() print(input1) print(input2)
8th Jun 2021, 10:18 AM
Ayush Kumar
Ayush Kumar - avatar