+ 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
6 Respuestas
+ 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.
0
Slick i do not get your point please give me any example
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?
0
Can you do this on my file too
0
Please
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