I'm super new to programming, like it's been less than a week and I've been tasked to write this simple program that uses functions that I wrote. From what I know, I don't understand why the code isn't working. this is my code:
def filter_teens(a=13, b=13, c=13):
def fix_age(age):
if (int(age) < 15 and int(age) >= 13) or (int(age) > 16 and int(age) <= 19) :
new_num = int(age) - int(age)
return new_num
if a != 15 or a != 16:
result_a = fix_age(a)
else:
result_a = int(a)
if b != 15 or b != 16:
result_b = fix_age(b)
else:
result_b = int(b)
if c != 15 or c != 16:
result_c = fix_age(c)
else:
result_c = int(c)
final_result = int(result_a) + int(result_b) + (result_c)
return final_result
sum = int(filter_teens(15, 13, 16)) ### I receive the error here
print(sum)