Posted in 面试题 onMay 20, 2014
代码如下(Python 3.0 下调试通过)
x = int(input(“Please enter an integer:”))
if x x = 0
print (‘Negative changed to zero’)
elif x == 0:
print (‘Zero’)
elif x == 1:
print (‘Single’)
else:
print (‘More’)
x = int(input(“Please enter an integer:”))
if x x = 0
print (‘Negative changed to zero’)
elif x == 0:
print (‘Zero’)
elif x == 1:
print (‘Single’)
else:
print (‘More’)
请用Python写一个获取用户输入数字,并根据数字大小输出不同信息的脚本
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@