Respuesta :
The program to convert MegaBytes to either Bytes, KiloBytes, GigaBytes, or TeraBytes is found in the attached image.
The program defines five helper functions to help the program do its work. The functions are:
- showBytes: Accepts an argument in megabytes, converts it by multiplying by 1048576, and prints the result
- showKiloBytes: Accepts an argument in megabytes, converts it by multiplying by 1024, and prints the result
- showGigaBytes: Accepts an argument in megabytes, converts it by dividing by 1024, and prints the result
- showTeraBytes: Accepts an argument in megabytes, converts it by dividing by 1048576, and prints the result
- menu: Displays the menu of options to either convert or quit the program
Within the Main Program, a while loop is used to make sure the menu continues to be presented to the user until the user selects the option to quit.
The inner while loop makes sure the user enters an option within the menu.
Once the user enters an option to convert, the program requests the value to be be converted, in MegaBytes. then an if statement selects the correct conversion function.
Another numeric problem solved using Python can be found here: https://brainly.com/question/20379340
