Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are asking to develop a Triangle Guessing game in Python for this assignment. The program accepts the lengths of three (3) sides of a

You are asking to develop a Triangle Guessing game in Python for this assignment.

The program accepts the lengths of three (3) sides of a triangle as input from a player. To simplify the program, assume all the lengths are positive integers. The program output should indicate whether the triangle is a right triangle, an acute triangle, or an obtuse triangle.

Make sure each side of the triangle is numerical value.

Check the triangle inequality. The sum of the lengths of any two sides of a triangle is greater than the length of the third side. If you take the three sides of a triangle and add them in pairs, the sum is greater than (not equal to) the third side. If that is not true, then it is not possible to construct a triangle with the given side lengths.

For any wrong input, tell the player what is wrong and asking to re-enter.

Allow a player to play multiple times, for example, using a while loop. Remind the player what input to stop the game.

Develop your game/program a user friendly one.

Document your program by adding comments:

Document every variable used at the program even the name is meaningful

Explain/comment operation/activity/logic of your code. For example, Checking whether the inputs are positive integers and Checking the validity the 3 lengths to see if they are able to form a triangle

Testing your program for all possible input and every of the 3 possible triangles.

PLEASE ADD COMMENTS IN THE CODING EXPLAINING STATEMENTS AND MAKE SURE CODE RUNS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

2. What type of team would you recommend?

Answered: 1 week ago