angle1 = int(input('Please enter the 1st angle:'))
angle2 = int(input('please enter the 2nd angle:'))
angle3 = int(input('please enter the 3rd angle:'))
Angle = angle1 + angle2 + angle3
while Angle == 180:
if angle1 and angle2 and angle3 < 90:
print ('this an actue triangle')
elif angle1 or angle2 or angle3 == 90:
print ('this is a right triangle')
elif angle1 or angle2 or angle3 > 90:
print ('this is an obtuse triangle')
Angle = angle1 + angle2 + angle3
angle1 = int(input('Please enter the 1st angle:'))
angle2 = int(input('please enter the 2nd angle:'))
angle3 = int(input('please enter the 3rd angle:'))
Я попытался сравнить каждый угол с условием, но, кажется, всякий раз, когда я вводил число в angle3, он просто сравнивается с условием и игнорирует два других угла. Пожалуйста, помогите мне с этим!Как сравнить более двух условий в python
Благодарим вас это работает отлично. – Isaac