我刚刚开始使用Python.当我在Windows上执行python脚本文件时,输出窗口出现但瞬间消失.我需要它留在那里,所以我可以分析我的输出.我该如何保持开放状态?
我在python中构建了一个非常简单的加法计算器:
#This program will add two numbers entered in by the user
print "Welcome!"
num1 = input("Please enter in the first number to be added.")
num2 = input("Please enter in the second number to be added.")
sum = num1 + num2
print "The sum of the two numbers entered is: ", sum
Run Code Online (Sandbox Code Playgroud)
我还没有设置python,所以我使用的是codepad.org(在线编译器).我收到以下错误:欢迎!请输入要加注的第一个号码.Traceback(最近一次呼叫最后一次):第5行,在num1 =输入("请输入第一个要加号的号码.")EOFError