I am making a program that determines if a triangle is obtuse(O),acute(A) or right(R)
Enter in the length of angles
>>> 3 8 9
TypeError: pythag() takes exactly 3 arguments (1 given)
I understand why I'm getting the error but what I'm trying to do is somehow loop the values of the list into the function and then call the function.
input = raw_input("Enter in the length of angles\n>>> ") #>>> 3 8 9
lst = input.split() #splits the input into a list by whitespace
for i in lst: #converts the values in the list to integers
int(i)
def pythag(a,b,c): #function to perform calculation
if a^2 + b^2 != c^2:
if c^2 > a^2 or b^2:
return "A"
else:
return "O"
else:
return "R"
pythag(lst)
Any suggestions?
Thanks in advance.