蓝冠官网-蓝冠公司|蓝冠招商注册-蓝冠开户
蓝冠官网(主管Q374919)

蓝冠平台硬核技术_不好意思请问我的问题出在哪里呢?

这是我打的
age = input(“Enter your age: “)
print(“Next year you will be ” + str(age +1))

终端机
Enter your age: 7
Traceback (most recent call last):
File “c:\Users\User\OneDrive\桌面\python\Exercise2-2”, line 70, in
print(“Next year you will be ” + str(age +1))
TypeError: can only concatenate str (not “int”) to str

请问为什么无法印出Next year you will be 8.
求解!!!

2022-10-01