如图是问题,我在编辑命令时想输入if-else条件语句,但是输入玩if后面的print时不知道接下来怎么打出else:我想换行一按enter就出现这样报错,那我到底要怎么输入else呢!
num=raw_input('please enter your number:')
num=int(num)
if num <=0:
print ("the number is below 0")
else:
print ("the number is over 0")
想输入成这种样式,同理python2.x下我也不知道怎么输入下去
输入的时候
print ("the number is below 0")
print前边必须打4个空格
建议不要直接在命令行里输程序,而是用集成编译环境,比如PyCharm、Spyder追问
print ("the number is below 0")
print前边必须打4个空格
建议不要直接在命令行里输程序,而是用集成编译环境,比如PyCharm、Spyder追问
YES,确实可以了耶!!但是,怎么接下去输入时他怎么不让结束呢,照样子下去是一直输入状态啊!怎么让他出结果啊
再打一个回车
温馨提示:答案为网友推荐,仅供参考