Question: Python 3.2: Create a program that calculates the perimeter of a triangle, where the user enters 3 lengths for sides of the triangle. Create a

Python 3.2: Create a program that calculates the perimeter of a triangle, where the user enters 3 lengths for sides of the triangle. Create a window with Entry Widget the for user to enter the three sides. The statement that is not a valid triangle should be put in the same label as the perimeter would be placed. Create a button to activate the calculation and display the result. Here is what I have so far, how would i use GUI to create a window? Call the title of the window "perimeter of triangle". The result should have a descriptive label.Python 3.2: Create a program that calculates the perimeter of a triangle,

try: import math edgel-eval (input ("Enter length for edge 1:")) edge-eval (input ("Enter length for edge 2:")) edge3-eval (input ("Enter length for edge 3:")) #formula to determine if edges create a possible triangle works-edgel+edge2 > edge3 and edgel +edge3 > edge2 and edge2+ edge3 > edgel #formula for perimeter perimeter-(edgel edge2 + edge3) #if statment to determine whether edges make up perimeter of if invalid if (works) print("The perimeter is", perimeter) else: print("The input is invalid") except: print ("Invalid input, enter a length for edge")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!