a=input('please write down a number:')
if a >= 0: print(a) else: print(-a)
加一句a=int(a)
已經解決! 謝謝 怎麼讓代碼在運作完後不自動退出
Sign in to make a reply
The-Purified
print an absolute value of an integer
a=input('please write down a number:')
if a >= 0: print(a) else: print(-a)