# Python Tutorial – Learn how to Program – Weight Conversion

Write a program that converts kilogram to pounds, ounces, grams, and US tons.

Output:

This program converts kilogram to pounds, ounces, grams, and US tons.
Enter the weight(kilogram/s): 5

********************
5.0 kilogram/s is equivalent to :
11.0231 pound/s
176.36984999999999 ounce/s
5000.0 gram/s
0.0055000000000000005 US ton/s

.

Solution:

length = 0
print “This program converts kilogram to pounds, ounces, grams, and US tons.”
length = float(input(“Enter the weight(kilogram/s): “))
print “\n********************”
print length, ” kilogram/s is equivalent to :”
print length * 1.30488, ” pound/s”
print length * 60975.60976, ” ounce/s”
print length * 999210.97561, ” gram/s”
print length * 35.28683, ” US ton/s”

This is a free programming tutorial for you.

Check out more Python tutorials on this site.

here’s my github repository for the Python codes of this blog:

ArjunAranetaCodes/MoreCodes-Python

Feel free to leave some comments. Thank you —-

—-

# Share the post

Python Tutorial – Learn how to Program – Weight Conversion

×