Question: need help writing a function in python 3 function needs to be able to re prompt the user for a input if they input something
need help writing a function in python 3
function needs to be able to re prompt the user for a input if they input something like a letter ("a" is an input)
if the input is 2.5 the output should be "-0.8011436133"

approximate_sin(x)---> float: b. This function accepts as input a numeric value X (measured in radians) and returns the approximate value of the sine of X. The number should be rounded to 10 decimal digits after the decimal point. The number is calculated as: sin(x) = f(-1)" 2012 = (2n+1)! The program will expand the series until the absolute value of the next term in the series is less than 1.0e-7 (the specified epsilon); that term will not be included in the sum. The parameter is a string; if it isn't in the correct format for a float, return None. C. Parameters: x (str) d. Returns: float or None e. The function displays nothing. approximate_cos (x) ---> float: a. This function accepts as input a numeric value X (measured in radians) and returns the approximate value of the cosine of X. The number should be rounded to 10 decimal digits after the decimal point. The number is calculated as: cos(x) = $(-1)" 42" cos(x)=2 (2n)! The program will expand the series until the absolute value of the next term in the series is less than 1.0e-7 (the specified epsilon); that term will not be included in the sum. The parameter is a string; if it isn't in the correct format for a float, return None. b. Parameters: x (str) c. Returns : float or None d. The function displays nothing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
