【发布时间】:2016-12-28 09:43:45
【问题描述】:
我是编程新手,所以我不知道出了什么问题。请帮忙
from math import atan2, pi
x = int(input("value of x"))
y = int(input("value of y"))
r = (x**2 + y**2) ** 0.5
ang = atan2(y/x)
print("Hypotenuse is", r, "angle is", ang)
【问题讨论】:
-
当您调用
atan2时,您需要传递2 个参数,y/x是1 个数字,例如论据 -
另外,检查
atan2(的右括号。