Inches to Centimeters Python Program – This Python Tutorial provides the source code of Inches to centimeters conversion program in Python programming language.
The source code of Python Program to Convert Inches to Centimeters
# Write a program that asks the user
# to enter height in inches.
# The program should convert it to centimeters.
# using the formula
# 1 inch = 2.54 centimeters
# Author: www.EasyCodeBook.com (c)
inches = float(input('Enter the Height in inches to convert into centimeters:'))
centi_meters = inches * 2.54
centi_meters = round(centi_meters,2)
print(inches,'Inches =', centi_meters,'Centimeters')
The output of the program will be:
Enter the Height in inches to convert into centimeters:66
66.0 Inches = 167.64 Centimeters
Python Program Convert Inches to Centimeters
1,766 total views, 12 views today