I want to write a function to compare two values, val1 and val2, and if val1 is larger than val2, add 1 point to a_points (Think of it like Team A) and vice versa (add one point to b_points if val2 is larger.) If the two values are even I won't add any points to a_points or b_points.
My problem is test_val will not return the values of a_points or b_points.
a_points=0
b_points=0
def test_val(a_points,b_points,val1,val2):
if val1 > val2:
a_points+=1
return a_points
elif val2 > val1:
b_points+=1
return b_points
elif val1==val2:
pass