第二题

戏唱故梦2025-03-24

创建文件

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