Question: Using Python : Function get_float(prompt) [2 points autograded] Use the Design Recipe to define a function get_float(prompt) which consumes a string, gets a floating-point value
Using Python :
Function get_float(prompt) [2 points autograded] Use the Design Recipe to define a function get_float(prompt) which consumes a string, gets a floating-point value from the user and returns the float. The function should use the prompt as the input message to the user and keep asking until a valid floating-point number is obtained. The user must enter only digits (at least one), (optionally) a single decimal, and (optionally) a leading - (if a negative value is desired). You may assume the existence of a working is_float(s) function as described above. Include a docstring!
Function get_history_filename(landing_num) [2 points autograded] Use the Design Recipe to define a function get_history_filename which consumes an int representing the current landing attempt. The function should return a string in format 'LandingNN.csv' where NN is two digits representing the current landing attempt. (01,02,03,....) Include a docstring! Note: You may assume the value passed will be between 0 and 99 inclusive.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
