subject
Engineering, 17.12.2021 14:00 mak6156

Write a Python program named DataByteConvert that asks the user to enter a Data in MegaBytes (MB) Data is entered only in MegaBytes. The program will then present the
following menu of selections:
1. Convert to Bytes
2. Convert to KiloBytes (KB)
3. Convert to GigaBytes(GB)
4. Convert to TerraBytes(TB)
5. Quit the program
The program will convert the data in MegaBytes(MB) to bytes, kilobytes(KB), GigaBytes(MB),
or TerraBytes(TB), depending on the user's selection rounded to six decimals. Here are the
specific requirements:
• Write a void method named showKiloBytes, which accepts the number of
MegaBytes(MB) as an argument. The method should display the argument
converted to kilobytes(KB). Convert the MB to KB.
• Write a void method named showGigaBytes, which accepts the number of
MegaBytes(MB) as an argument. The method should display the argument
converted to Gigabytes(GB).
• Write a void method named show TerraBytes, which accepts the number of
MegaBytes(MB) as an argument. The method should display the argument
converted to TerraBytes(TB). Convert the MB to TB.
• Write a void method named showBytes, which accepts the number of MegaBytes
(MB) as an argument. The method should display the argument converted to
Bytes(B). Convert the MB to B
• Write a void method named menu that displays the menu of selections. This
method should not accept any arguments.
1. The program should continue to display the menu until the user enters 5 to quit the
program.
2. The program should not accept negative numbers for the data in MegaBytes.
3. If the user selects an invalid choice from the menu, the program should display an error
message.
4. Use Exponential format if needed when converted {:e) formats ...)
5. Use
6. Add comments to show what each function does.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 19:30
When using the ohmmeter function of a digital multimeter, the leads are placed in what position relative to the component being tested? a. parallel b. control c. series d. line
Answers: 3
question
Engineering, 04.07.2019 18:20
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 °c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
Answers: 2
question
Engineering, 04.07.2019 19:20
Determine (a) the maximum thermal efficiency of reversible power cycles operating between a hot reservoir at 1000°c and a cold reservoir at 200°c and (b) the maximum cops for reversible refrigeration and heat pump cycies, respectively, between 28°c and 14°c.
Answers: 1
question
Engineering, 06.07.2019 04:30
Mention two examples each of the direct and indirect measurement of force.
Answers: 3
You know the right answer?
Write a Python program named DataByteConvert that asks the user to enter a Data in MegaBytes (MB)...
Questions
question
Biology, 10.12.2020 21:30
question
Arts, 10.12.2020 21:30
question
Mathematics, 10.12.2020 21:30
question
English, 10.12.2020 21:30
question
Mathematics, 10.12.2020 21:30
question
Biology, 10.12.2020 21:30
Questions on the website: 13722359