Write a program called four_functions.py
that includes four functions and a main()
program that calls the functions.
The first function is called give_instructions
. It takes no parameters, and it returns no values. It just prints out an explanation that the program is going to calculate the area of a rectangle.
The second function is called get_input
. It takes no parameters. It asks the user to enter the length and width of a rectangle, and it returns those values to the main program.
The third function is called calculate_area
. It takes parameters for length and width, does a calculation to determine the area, and returns that result to the main program. It doesn't print anything.
The fourth function is called display_results
. It takes a parameter for the area and prints out the results of the program. It doesn't return anything.
The main program calls the functions as needed.