+ 3

What's wrong in this code?

name = (input("enter your name:")) print ("Iam" + name + "!") age =input ("what's your age ?") print ( "lam" + str(age) + "years old")

14th Dec 2020, 6:50 PM
Buthina Babeker (Both Beko)
Buthina Babeker (Both Beko) - avatar
3 Respostas
+ 1
Nothing, it works fine. In sololearn you have to give all input at start on multiple lines like this: Both Beko 20
14th Dec 2020, 6:57 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
age holds a string, which is fine for what you are doing. If you want to do calculations with it, use Царь СОБАКА - Догго I 's suggestion. Anyway no need for str()
14th Dec 2020, 7:01 PM
Benjamin Jürgens
Benjamin Jürgens - avatar