Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Could I get some help with thispython code? Thanks in advance! Write a program that does the following: 1. Prompt the user to enter in
Could I get some help with thispython code? Thanks in advance!
Write a program that does the following: 1. Prompt the user to enter in file size in Kilobytes (KB) 2. Convert the supplied input into bits, bytes, megabytes and gigabytes. You can use the following conversion values: 8 bits = 1 byte 1024 bytes = 1 kilobyte (KB) 1024 kilobytes = 1 megabyte (MB) 1024 megabytes = 1 gigabyte (GB) 3. Output your results as follows. Your converted values should line up in a column (right-justified) followed by the units of measurement (left justified). Format your converted values to two decimal places, and add comma separators as necessary. Enter a file size, in kilobytes (KB): 20000 20000 KB ... ... in bits ... in bytes ... in megabytes 163,840,000.00 bits 20,480,000.00 bytes 19.53 MB in gigabytes 0.02 GB 4. Comment your source code and describe your code to someone who may be viewing it for the first time. Also include your name, the date, your class section and the name of your program at the top of your file. 5. You may assume that your user gives you a reasonable number to work with. Use the format() function to line up the results neatly.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started