我正在编写一个程序,可以让你输入三角形的三个角或边,它会告诉你它是等边的、等腰的等等。我现在不担心剩下的,但我被困在它的等边部分. 这是我的代码:
def idtri():
print("\nDo you have all three sides, or al three angles?")
print("(1) Sides")
print("(2) Angles")
choice = input()
if choice == 1:
print("\nType in the lengths of all of the sides.")
t1 = input("1: ")
t2 = input("2: ")
t3 = input("3: ")
print("Your triangle is an equalateral triangle.")
menu()
elif choice == 2:
pass
idtri()