+ 1

How to get two different inputs in python

I am trying to make a lcm calculator for which I need to different inputs for the lcm https://code.sololearn.com/ctqqAq22th2U/?ref=app

19th Apr 2021, 11:48 AM
Anshul Sharma
Anshul Sharma - avatar
6 Respostas
+ 1
You have to enter all your inputs at once before running. Each input should be on a seperate line and then you can hit submit.
19th Apr 2021, 11:51 AM
Slick
Slick - avatar
0
Slick i do not get your point please give me any example
19th Apr 2021, 11:53 AM
Anshul Sharma
Anshul Sharma - avatar
0
You already have an input for num1, write another for num2. Then hit RUN, # enter input: 2 3 Then hit SUBMIT # see how 2 and 3 are on seperate lines?
19th Apr 2021, 11:55 AM
Slick
Slick - avatar
0
Can you do this on my file too
19th Apr 2021, 12:02 PM
Anshul Sharma
Anshul Sharma - avatar
0
Please
19th Apr 2021, 12:02 PM
Anshul Sharma
Anshul Sharma - avatar
0
you just need to do this: num1 = int(input(“insert first number”)) num2 = int(input(“insert second number”)) as you see you just need to repet the input. Between the “ “ ive written what the user sees so they know what to do, and its useful for you too because you understand how the inputs work. ive put int(....) too becouse inputs are strings and sice you need to do math with them you need numbers. you can put float so you can use decimale numbers
19th Apr 2021, 3:04 PM
Veronica