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
Calculate the bore of a cylinder that has a stroke of 18 inches and an extension time of 6 seconds at a flow rate of 4 gal/min.
Answers: 3
question
Engineering, 04.07.2019 18:10
Atmospheric air has a temperature (dry bulb) of 80° f and a wet bulb temperature of 60° f when the barometric pressure is 14.696 psia. determine the specific humidity, grains/lb dry air. a. 11.4 c. 55.8 d. 22.5 b. 44.1
Answers: 1
question
Engineering, 04.07.2019 18:20
Find the minimum film thickness for a journal bearing with the data below. shaft diameter, d-50 mm, clearance ratio, cdratio? 0.001, shaft speed, n 2000 rpm; bearing length. i 200 mm; eccentricity ration, ? -0.55. ( note, cdratio-ca/d) the minimum film thickness is um
Answers: 2
question
Engineering, 04.07.2019 18:20
An open feedwater heater operates at steady state with liquid entering at inlet 1 with t? = 40°c and pl = 1 .2 mpa. water vapor att2-200°c and p2 = 1.2 mpa enters at inlet 2. saturated liquid water exits with a pressure of pa 1.2 mpa. neglect heat transfer with the surroundings and all kinetic and potential energy effects, determine the mass flow rate of steam at inlet 2 if the mass flow rate of liquid water at inlet 1 is given as 2 kg/s.
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
Chemistry, 14.06.2021 04:40
question
Advanced Placement (AP), 14.06.2021 04:40
question
Mathematics, 14.06.2021 04:40
question
Mathematics, 14.06.2021 04:40
Questions on the website: 13722367