1)Write Python code that asks the user for two angles of a triangle. Then, first determine if the triangle can
exist (make sure that the third angle can be found such that the sum of the three angles is 180°, with all
angles both given and computed conforming to the definition of a triangle). If the triangle can’t exist,
print a message explaining the fact, and quit. If it can exist, then the code should proceed to step 2.
2. Discover whether the triangle has any of the following properties: right, acute, obtuse, isosceles,
equilateral. Print out this information in a formatted way, such as this (but with correct yesses/no’s):
3. Implement your program so that at the end, the user is asked if they want to compute
properties for another triangle; if they indicate they want to do so, perform the calculation again. This
option should be available an unlimited number of times, after each successive triangle computation.
Your menu code should accept these inputs to make a choice: "Yes", "yes", "y", "Y","No", "no", "n", or
"N". (Hint: draw a flow chart and then write pseudocode before attempting this).
Jump to Post
You forgot your pseudocode and code. Do not forget to push CODE
All 14 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.