Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

MBps to Mbps converter! - Find your real download speed from the advertised ISP speed

Hello, I haven't done any python in years, so I thought a simple project like this would get me going.

Basically this converts the speed in Mbps your ISP advertises their connections to be into your actual download speed. For example if your ISP offers a 100/20(Mbps) connection, your actual download speed in MBps would be 12/2.5

2.7:
Code
print '---------------General Information-----------------'
print 'Mbps (symbol Mbit/s or Mb/s):  Megabit per second'
print 'MBps: Megabyte per second'
print '8 bits = 1 byte'
print '1 Mbps = 1,000,000 bits per second'
print '1 MBps = 1,000,000 bytes per second = 8,000,000 bits per second = 8 Mbps'
print '----------------------------------------------------\n'


print('MBps is what your download speed is.')
print('Mbps is what your ISP says you shall get.')


Running = True

while Running == True:
    print('_____________________________________________________')

    Type = raw_input('\n\nPlease enter MBps or Mbps \n@>')
    
    Converted = 0

    if Type == 'MBps':
        print('You have entered MBps. Converting to Mbps.')
        Amount = input('Please enter your download speed \n@>')
        Converted = Amount*8
        print('Your download speed is: %sMBps. Your ISP list this speed as: %sMbps' % (Amount, Converted))

    elif Type == 'Mbps':  #can also use: 'Mbps' in Type:
        print('You have entered Mbps. Converting to MBps.')
        Amount = input('Please enter your ISPs advertised speed \n@>')
        Converted = Amount/8
        print('Your ISP will say your speed is: %sMbps. Your actual download speed is: %sMBps' % (Amount, Converted))

    else:
        print('Please enter valid type')
        
    End = input('\nEnter 1 to restart\n@>')
    if End != 1:
        Running = False
Any comments on how I could improve would be good too.

If anyone has any other small simple ideas that I should make please share them! I'm looking for anything that's fun and small that will help me learn. Any ideas!?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by N1nj4Styl3Sep 5, 2015 12:50 AM 9 610 Sep 5, 2015 12:50 AM
Last Post: Odus
[.NET] by Gr0wlitJun 27, 2012 12:00 PM 6 303 Jun 27, 2012 12:00 PM
Last Post: Gr0wlit
[.NET] by TeslaHackMar 4, 2012 06:00 PM 4 213 Mar 4, 2012 06:00 PM
Last Post: Eternal Darkness