Question: ( Python ) Assignment Instructions: Write a function named print _ menu ( ) print _ menu ( ) that takes no arguments and returns

(Python) Assignment Instructions: Write a function named print_menu()
print_menu() that takes no arguments and returns nothing, don't forgat to add the docstring for the new function. Its whole job is to print this menu:
Main Menu
---------
1- Process a new data file
2- Choose units
3- Edit room filter
4- Show summary statistics
5- Show temperature by date and time
6- Show histogram of temperatures
7- Quit
Incidentally, during the rest of the course, we will work on implementing all of the items referenced by the menu.
We are first going to write stub functions which will later be completed. A stub is a function that has the expected signature (i.e. name of the function and parameters), but an incomplete implementation. A stub function is used as a placeholder and so that the code that calls the function can be tested before the called function is fully written.
Next, we need stub functions for the following
Each line below gives you the function signature (name of the function and it's parameters) of each function that you will create in the assignment
new_file(dataset) will be called when the user chooses item one.
choose_units() will be called when the user chooses item two.
change_filter(sensor_list, active_sensors) will be called when the user chooses item three.
print_summary_statistics(dataset, active_sensors) will be called when the user chooses item four.
print_temp_by_day_time(dataset, active_sensors) will be called when the user chooses item five.
print_histogram(dataset, active_sensors) will be called when the user chooses item six. This is an optional no-credit project.
And what about item seven? The program should exit gracefully. In addition, to implementing these new functions, you need to create logic in the main() to print the menu, ask for the user's input, and process the response. Your code should call the appropriate function and then print the menu again. This is the Unit Test for this Lab Assignment.
Some of these functions require parameters, but we haven't defined the variables (arguments) that we need to pass to the functions. The interpreter will complain if you call the functions without any arguments. For now, you can just call the functions that require an argument with None, e.g. new_file(None). The None object is used to define a null value (no value at all). None is not the same as 0, False, or an empty string. None is an object type (NoneType) and only None can be None.
How will you call a function that takes two arguments?
Whenever you prompt for input be sure to allow the response to the prompt to be on the same line and to put a space after the prompt to increase readability. Previous Code: def print_header():
print("STEM Center Temperature Project")
print("Name")
def main():
print_header()
if __name__=="__main__":
main()

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!