-3

代码:

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。

4

1 回答 1

4
avnum2 = int(input("Enter the number to have it's absolute value found: ")
                                                                          ^

你错过了)这条线的关闭。

于 2013-08-09T18:49:18.233 回答