我對編程非常陌生,并試圖搞亂輸入。幾周前我寫了一個簡單的生日計算器: 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
提交
取消