350 views
25 votes
Define a function calc_total_inches, with parameters num_feet and num_inches, that returns the total number of inches. Note: There are 12 inches in a foot.

User Geremy
by
5.1k points

2 Answers

6 votes

Answer:

def print_total_inches (num_feet, num_inches):

print('Total inches:', num_feet * 12 + num_inches)

print_total_inches(5, 8)

Explanation:

I'm not sure what language you needed this written in but this would define it in Python.

User RSid
by
5.1k points
13 votes

Answer:

def calc_total_inches(num_feet, num_inches):

return num_feet*12+num_inches

Step-by-step explanation:

User JStriedl
by
5.5k points