I have two scripts: rank.py and elo_7.py. The elo script pulls info from rank.
In elo_7.py:
...
elif player_1.age or player_2.age > 50 and abs(player_1.age-player_2.age) > 10:
(make some adjustment)
In rank.py:
class Player:
def __init__(self,name,age,rank_nogi,record,weight,school):
self.name=name
self.age=age
self.rank_nogi=rank_nogi
self.record=record
self.weight=weight
self.school=school
player_1=Player('John',20,1600,0,91,'SJJ')
player_2=Player('Sally',29,1650,0,81,'SJJ')
Since the age difference is only 9 years and neither player is over 50 the elif
statement should not execute and yet it does. Could someone please explain why?
On a side note, if I change the or
to and
then it will not execute.