Given an array of integers representing measurements in inches,
write a program to calculate the total of measurements in feet
Ignore the measurements those are less than a feet (e.g. 10)
Answers
Answered by
5
inches = [34, 432, 21, 10, 53]
ignore_10_list = [n for n in inches if n !=10]
total = sum(ignore_10_list)
print(f"{total / 12} feet")
Similar questions