About the challenges
The challenges below allow you to apply your knowledge of the topics up to this point. Attempt the challenges in a Python IDE of your choice.
Challenge 2: Triangle identifier
num1 = int(input("Enter the first number: ")) num2 = int(input("Enter the second number: ")) num3 = int(input("Enter the third number: ")) if num1 == num2 == num3:
print("Equilateral triangle") elif num1 == num2 or num1 == num3 or num2 == num3: print("Isoceles") else: print("Scalene") |
This is just one solution. You may have checked the conditions in a different order. If yours is different and you are uncertain it is right test it with each of the types of triangles.