Question: Have you ever noticed that when you buy a computer, the hard drive always seems a little smaller than what is advertised? That is because
Have you ever noticed that when you buy a computer, the hard drive always seems a little smaller than what is advertised? That is because hardware manufacturers sell disk drives using the metric system, while computers use base Therefore, a megabyte is sold as million bytes instead of as or : bytes. Likewise, a gigabyte is sold as one billion bytes bytes, instead of the or bytes. However, since computers still interpret information as powers of the hard drive capacity understood by the computer is much less. Today, the "traditional" gigabyte that was in powers of two is known as a gibibyte GiB to distinguish it from the metric version of Gigabyte. Likewise, is referred to as a mebibyte MiB To summarize, bytes, while GiB is bytes; bytes, while MiB bytes.
Write a procedure called datalost that asks the user for the size of a purchased hard drive in Gigabytes Your procedure should then calculate the corresponding number of bytes in gibibytes and the remainder in mebibytes, and output that, along with the number of theoretical bytes lost. You may assume that the user always inputs an integer. Use the builtin function round to round the remaining mebibytes to the nearest whole number. Sample usage is shown below:
Sample InputOutput
Please enter drive size:
The drive is actually GiB and MiB
This represents a loss of GiB and MiB
Sample InputOutput
Please enter drive size:
The drive is actually GiB and MiB
This represents a loss of GiB and MiB
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
