"Ounces To Pounds" & "Pounds To Ounces" converter!

By AnaBotNowYourGone on May 02, 2010

READ BEFORE USING
This is a simple Pounds To Ounces and Ounces To Pounds converter! Type oz2lb() for ounces to pounds. Type lb2oz() for pounds to ounces. ALL NUMBERS YOU ENTER MUST HAVE A DECIMAL IN THEM! DO NOT TYPE 15, TYPE 15.0! NOT ADDING A DECIMAL MAY LEAD TO A WRONG ANSWER! ;) Have fun!

print 'REMEMBER ALL NUMBERS MUST HAVE A DECIMAL IN THEM... for example do not type 15 for ounces you will get 0 pounds. Type 15.0 and you will get the correct answer!'
print 'type oz2lb() to convert ounces to pounds type lb2oz() to convert pounds to ounces!'

def oz2lb():
    Ounces = input('Enter ammount of ounces: ')
    Pounds =  Ounces / 16;
    print Ounces, 'Ounces =', Pounds, 'Pounds';

def lb2oz():
    Pounds = input('Enter ammount of pounds: ')
    Ounces =  Pounds * 16;
    print Pounds, 'Pounds =', Ounces, 'Ounces';

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.