logo image

Python program to convert grams to kilograms

Views: 209

Following program shows you how to convert grams to kilograms. In this program we get grams from user, once we get those we need to divide with 1000 so that we get in kilograms

grams = float(input("Please enter grams:"))
kilograms = grams / 1000
print(kilograms, " Kilograms")


Please enter grams: 3000
3.0  Kilograms
We are looking for Interns!
Send your resumes to
[email protected]