标题基本上说明了一切。 这是我的剧本:
keepProgramRunning = True
a = int(input("Type a value for a: "))
b = int(input("Type a value for b: "))
print("Result when multiplying: ", a*b)
print("Result when dividing: ", a/b)
print("...", a-b)
print("...", a+b)
在我键入a和b值而不使用cmd自动关闭后,如何才能看到结果。在
等待另一个输入
最简单的方法是等待用户输入
在末尾添加:
或者,如果从命令行运行脚本,则在脚本结束后窗口不会消失。在
相关问题 更多 >
编程相关推荐