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, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
Which of the following components of a pid controlled accumulates the error over time and responds to system error after the error has been accumulated? a)- proportional b)- derivative c)- integral d)- on/off.
Answers: 2
question
Engineering, 04.07.2019 19:10
How to increase the thermal officiency of an ideal simple rankino cycle? among these methods, which one is the best and why?
Answers: 2
question
Engineering, 06.07.2019 03:10
An electrical kettle is made out of stainless steel,weighs two pounds (when empty) with a heating element that consumes 2 kw of electricity. assuming that the water and the kettle are at the same uniform temperature at any moment of time, calculate the shortest possible time to bring 2 quarts of water from room temperature to the onset of boiling.
Answers: 1
You know the right answer?
Write a Python program named DataByteConvert that asks the user to enter a Data in MegaBytes (MB)...
Questions
question
Mathematics, 30.01.2021 21:30
question
English, 30.01.2021 21:30
Questions on the website: 13722360