63.8k views
5 votes
Define a function print_total_inches, with parameters num_feet and num_inches, that prints the total number of inches. Note: There are 12 inches in a foot.

Sample output with inputs: 5 8

User Scofield
by
5.7k points

1 Answer

4 votes

I wrote my code in python 3.8:

def print_total_inches(num_feet, num_inches):

return ((num_feet)*12) + num_inches

print("There are a total of {} inches".format(print_total_inches(5,8)))

I hope this helps!

User Long Luong
by
6.5k points