Topic: Python Pounds to Kilograms Conversion Program – This Python Programming Tutorial will explain the Python code to input weight in pounds and convert into kilograms.
The Formula for the Pounds to Kilograms Conversion
e will use the following formula to convert the given pounds in kilograms.
1 Pound = 0.453592 Kilograms
or 1 lb = 0.453592 Kg
Practically Write and Execute – Super Python Example Programs – Video Tutorial
Python code to convert Lbs into Kgs will use:
1. Python print() function to show messages, values and results.
2. input() function for getting input in pounds from the user
3. float() function to convert the numeric string returned by input function into numeric value actually may be a real number.
4. The Python assignment statement to calculate the formula for Lbs to Kgs Conversion.
The Source Code of Python Pounds to Kilograms Conversion Program
The output of Lbs to Kg Python Code
Enter weight in Pounds(Lbs) to Convert into Kilograms:10 10.0 Pounds (Lbs) are equal to 4.53592 Kilograms (Kgs) Another output from a second sample run of the program: Enter weight in Pounds(Lbs) to Convert into Kilograms:135 135.0 Pounds (Lbs) are equal to 61.23492 Kilograms (Kgs)
The Output from a Sample Run of the Python Program
Enter weight in Pounds(Lbs) to Convert into Kilograms:40.50
40.5 Pounds (Lbs) are equal to 18.370476 Kilograms (Kgs)
Enter weight in Pounds(Lbs) to Convert into Kilograms:500
500.0 Pounds (Lbs) are equal to 226.796 Kilograms (Kgs)
Another sample Run:
Enter weight in Pounds(Lbs) to Convert into Kilograms:170
170.0 Pounds (Lbs) are equal to 77.11064 Kilograms (Kgs)
You may also like to Red:
- Kilograms to Pounds Python Program
- Python 3 tkinter GUI Kilogram to Pounds Program
- Python 3 GUI Miles to Kilometers Converter tkinter Program
- Python Pounds to Kilogram Converter GUI tkinter Program
11,828 total views, 21 views today