1. Write a program that asks the user for a height in inches and prints out how many feet and inches that is. There are 12 inches in one foot. For instance, 40 inches is 3 feet and 4 inches. [Hint: use the // operator and the % operator to get each part.]
inches = int(input("height in inches: "))
print(f"{inches//12} feet and {inches%12} inches")
Comments
Leave a comment