Write a function sizeformatb that takes an integer b that


Write a function, size_format(b), that takes an integer, b, that represents a number of bytes and returns a readable string representation of this number of bytes. 

The representation uses the metric units of bytes (B), kilobytes (KB), megabytes (MB), gigabytes (GB), and terrabytes (TB) and includes 1 significant decimal place. If b is a negative number, the function should return a string 'buy a new hard disk'.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a function sizeformatb that takes an integer b that
Reference No:- TGS02512076

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)