Discuss / Python / 简单且会用

简单且会用

Topic source

Mr_小惡米

#1 Created at ... [Delete] [Delete and Lock User]

# print absolute value an integer:

b=input('请输入数字:')

a=int(b)

if a >=100:

    print(a)

else:

    print(-a)

PS:int是将input输出的str类型转化为数字,好像是这样,个人的理解。


  • 1

Reply