Question: Using Python 3.1.1 Design a program for the following: The program should have a minimum of 2 functions and a main module. It must also
Using Python 3.1.1 Design a program for the following:
The program should have a minimum of 2 functions and a main module. It must also be utilizing arguments/parameters.
Your friend Michael runs a catering company. Some of the ingredients that his recipes require are measured in cups. When he goes to the grocery store to buy those ingredients, however, they are sold only by the fluid ounce. He has asked you to write a simple program that converts cups to fluid ounces.
Design the following algorithm:
Display an introductory screen that explains what the program does.
Get the number of cups.
Convert the number of cups to fluid ounces and display the result.
Here are summaries of those functions:
intro this function will display a message on the screen that explains what the program does
cups_to_ounces this function will accept the number of cups as an argument, calculate and display the equivalent number of fluid ounces ounces = cups * 8
main this function will ask the user to enter the number of cup. The value will be passed to the cups_to_ounces function.
| Sample Output: This program converts measurements in cups to fluid ounces. Enter the number of cups: 4 That converts to 32 ounces. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
