Question: 1. Using the math library, create a Python program to calculate the side of a right triangle. Write three (3) functions: 1. SOH, 2. CAH.

1. Using the math library, create a Python program to calculate the side of a right triangle. Write three (3) functions: 1. SOH, 2. CAH. 3. TOA.

  • Create a main() -function
  • Create 3 functions for calculations
  • Use user input to specify which side youre calculating
  • Ask the user for input angle and side for the calculation
  • Make continuous until use of Exit or 0 when asking for the calculated side
  • How to calculate: link

2. Use the given unit tests to test out the solution of the functions created in problem (1). Add two (2) new unit tests to test out the main() function and two (2) new unit tests to test out any of the other functions.

  • The purpose is to come up with tests that will see if the system will fail.
  • If it fails, the program should be modified to make sure passes all tests.

Help would be greatly appreciated, thank you very much.

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!