python lab cycle1
Exercise 1:
Write a program that asks the user for a weight in kilograms and converts it to pounds. There are 2.2 pounds in a kilogram.
Source Code:
weight = float(input("Enter weight in kilograms: "))
pounds=2.2*weight
print(weight,"Kilograms is equal to",pounds,"Pounds")
RESULT:
1.
Enter weight in kilograms: 40
40.0 Kilograms is equal to 88.0 Pounds
2.
Enter weight in kilograms: 10
10.0 Kilograms is equal to 22.0 Pounds
Comments
Post a Comment