第二题
戏唱故梦2025-03-24
创建文件
File -> New File
或 快捷键Ctrl + N
- 输入代码
a = int(input("please input a Number:")) b = a + 12 if b > 20: print(b)
File -> Save
或 快捷键Ctrl + S
保存文件到桌面,文件名为Ex2-5.py
Run -> Run Module
或 快捷键F5
运行代码- 答案:第4, 5次留空
次数 | 行数 | 修正后的语句 | 出错类型和原因 |
---|---|---|---|
3 | #2 | int(input("please input a Number:")) | 类型错: can only concatenate str (not "int") to str string只能拼接string |