我对编程非常陌生,并试图搞乱输入。几周前我写了一个简单的生日计算器: name = " # name"bday = # year of birthcurrent_year = 2020age = current_year - bdayprint(name.title() + " will turn:")print(age)print("this year")我决定通过使用实际输入来改进这个概念,并开始在 Sublime 中进行尝试。它允许我输入名称,但是当我按回车键时,什么也没有发生。这是程序的输入版本:current_year = 2020name = str(input("what is the name: "))bday = str(input("what year were they born in: "))age = curent_year - bdayprint(name.title() + " will turn:")print(age)print("this year")
添加回答
举报
0/150
提交
取消