+ 1
name age print(name + " is " + age + " years old")
2 Respuestas
+ 6
AxenTzy. ,
i suppose that your question is related to the tutorial *python for beginners* lesson exercise 17.2. it would be very helpful if you could publish the required information in the future.
Anonymous ,
codes that are used for code coach exercises in sololearn can not have any text prompt inside the input() function. so your code suggestion will not pass the test cases.
in addition, the code contains 2 errors:
> missing closing parenthesis at the end of line 2
> string and integer can not be concatenated in line 3
? you have not been running your code suggestion - right ?
+ 1
name = input("Enter your name:")
age = int(input("Enter your age:")
print(name + " is " + age + " years old")
AxenTzy. This is proper code.