Docsity

Python program to convert inches into cm using functions, Exercises of Computer Science

Partial preview of the text

Download Python program to convert inches into cm using functions and more Exercises Computer Science in PDF only on Docsity!

Python program to convert inches into cm using functions : Code :

Program to covert inches into cm using functions

def inch_to_cm(): inch = int(input("Enter inches : ")) cm = inch * 2. print(f"{inch} inches = {cm} cm ") inch_to_cm() Output :