代码:
print ("Welcome to my Calculator")
print ("Calculators: Absolute Value [av]")
load = int(input("Enter the calculator code here: "))
if load == av:
import cmath
import math
avnum2 = int(input("Enter the number to have it's absolute value found: ")
**avsol** = cmath.fabs (avnum2)
print ("The solution (absolute value) is: ", avsol)
avsol上有语法错误,是的,我导入了cmath。
答案 0 :(得分:4)
avnum2 = int(input("Enter the number to have it's absolute value found: ")
^
你错过了这一行的结束)
。