Question: Can anyone tell me which function is not working and its reason? Exercise 4: Given 3 int values, a b c, return their sum. However,
Can anyone tell me which function is not working and its reason?

Exercise 4: Given 3 int values, a b c, return their sum. However, if any of the values is a teen -- in the range 13.. 19 inclusive -- then that value counts as 0, except 15 and 16 do not count as a teens. Write a separate helper "def fix_teen(n):" that takes in an int value and returns that value fixed for the teen rule. In this way, you avoid repeating the teen code 3 times (i.e. "decomposition"). a A) def no_teen_sum (a, b, c): a = fix_teen (a) b = fix_teen (b) C = fix_teen (c) return a + b + c C) def no_teen_sum (a, b, c): = fix_teen (a) b = fix_teen (b) C = fix_teen (c) return a + b + c def fix teen (n): if n == 15 or n == 16: return n else: return 0 def fix teen (n): if n == 15 or n == 16: return n if n >= 13 and n =13 and =13 and b =13 and c = 13 and n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
