satya

Tuesday, September 1, 2020

Program 1


Program 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.

Program:

KG=float(input("Enter the weight in Kilograms:"))

pounds=2.2*KG

print("weight in pounds:",pounds)

 

output:

Enter the weight in Kilograms:56

weight in pounds: 123.20000000000002

No comments:

Post a Comment

Program 30

                                                                         Program 30 Write a Python class to implement pow(x, n). class Pow1:...