Creating a program that request the download speed in megabits per second and the
size of a file in megabytes.
Algorithm
1. request the download speed in megabits per second
2. Request the file size in megabytes
3. Convert file size from MB to megabites
4. Calcuate the download time in seconds
5. Display the download speed, file size, and download time with two decimal
places
"""
def main():
#Request the download speed in megabits per second
download_speed = float(input("Enter the download speed (Mbs):"))
#Request the file size in megabytes
file_size = float(input("Enter the file size (MB): "))
#Convert file size from MB to megabites
file_size_in_bits = file_size * 8
# Calcuate the download time in seconds
download_time = file_size_in_bits/download_speed
#Display the download speed, file size, and download time with two decimal places
print(f"Download speed: {download_speed:.2f} Mbs")
print(f"File size: {file_size:.2f} MB")
print(f"Download time: {download_time:.2f} seconds")
main()