What's the error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the error?

print ("Wanna know ideal age of gf?") Your_age = input("Put your age : ") Your_fav_number = (4) print ("Ideal age of your gf is" + str (Your_age + Your_fav_number ) )

18th Nov 2018, 3:59 PM
Prakhar Sharma
Prakhar Sharma - avatar
3 Answers
+ 2
input() return string, that mean Your_age value is string, but you try to add it with int at the last line. Thats why Convert the input to int, it should work
18th Nov 2018, 4:04 PM
Taste
Taste - avatar
+ 1
int(input("somethinh"))
18th Nov 2018, 4:11 PM
Taste
Taste - avatar
0
can you edit it and give it to me?
18th Nov 2018, 4:06 PM
Prakhar Sharma
Prakhar Sharma - avatar