一般配合变量使用,把input()放进去
a = input()
print(a)
可以增加输入提示
a = input('请输入你的名字:')
print(a)
任务2要类型一样才能加减,把字符串变成整型
age = input('请输入你的年龄:')
age = int(age)
year = 2024
birth = year-age
print('出生日期是',birth)
标签:函数,age,birth,year,print,input,python1,输入
From: https://blog.csdn.net/qq_42547097/article/details/141397144