0

Question regarding how to put 2 inputs

I mean like if i will code Num1 = input("Enter name here: ") Num2 = input("Enter age here: ") print("Hello " + name + " you are " + age) But if i will type the code it only enters the name and then some errors

16th May 2020, 8:50 AM
Avocado
8 Antworten
+ 1
Thank you Granger I got it now i was typing the input like: Cat10 so it gives me an error but I fixed it by putting : Cat 10 The code now works thank you
16th May 2020, 9:05 AM
Avocado
0
Help
16th May 2020, 8:57 AM
Avocado
0
name = input("Enter name here: ") age = int(input("Enter age here: ")) # use int() function to typecast (convert ) input into int data type print(f"Hello {name}, your age is {age}") # use this shortcut to concatenate / text formatting
16th May 2020, 9:02 AM
Manish
Manish - avatar
0
https://code.sololearn.com/cRSwCQvrpbBp/?ref=app I was able to build simple calculator lol
16th May 2020, 9:13 AM
Avocado