Question: Function Name: trigonometry() Parameters: degrees ( str ), operation ( str ) Returns: answer ( float ) Description: You will be given a string which
Function Name: trigonometry()
Parameters: degrees ( str ), operation ( str )
Returns: answer ( float )
Description: You will be given a string which indicates what degree angle you are working with. Using Pythons math module, write a function that converts the degrees to radians, and return either the cosine, sine, or tangent of 'x' radians, depending on what the user passes in. If the user does not pass in an acceptable trigonometric function ( cosine , sine , or tangent ), just return the radian value. All values returned should be rounded to 2 decimal places
Trigonometry Function Name: trigonometry() Parameters: degrees (str), operation (str) Returns: answer ( float) Description: You will be given a string which indicates what degree angle you are working with. Using Python's math module, write a function that converts the degrees to radians, and return either the cosine, sine, or tangent of 'x' radians, depending on what the user passes in. If the user does not pass in an acceptable trigonometric function ( cosine, sine, or tangent ), just return the radian value. All values returned should be rounded to 2 decimal places. >>> print (trigonometry("38.70", "cosine")) 0.78 >>> print (trigonometry("180", "arc sine")) 3.14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
