def Fitness(a, b, c):
if ((a&b&c) >= 4) & ((a+b+c) >= 13):
return('Gold')
if ((a&b&c) >= 3) & ((a+b+c) >= 10):
return('Silver')
if ((a&b&c) >= 2) & ((a+b+c) >= 07):
return('Pass')
else:
return('Fail')
now the Problem is when Fitness(2,2,5) is given, the control jumps to default ie. ‘Fail’.
Where is the actual output is ‘Pass’. ?
Note that
is different from
I think you mean the second one, i.e. all values are larger than two. (The first one does a binary and with all your values and compares this to the value two.)