python判断正负数

2023-01-31 03:01:32 python 判断 负数
a1 = raw_input("please input a number")
a = int(a1)
if(a!=0):
if(a > 0):
print '这是正数'
if(a < 0 ):
print '这是负数'
else:
print 'the number is equal to 0'

相关文章