passing tests - saving goldmedal score
This commit is contained in:
@@ -327,7 +327,10 @@ def calculate_age(born,today=None):
|
||||
if not today:
|
||||
today = date.today()
|
||||
if born:
|
||||
return today.year - born.year - ((today.month, today.day) < (born.month, born.day))
|
||||
try:
|
||||
return today.year - born.year - ((today.month, today.day) < (born.month, born.day))
|
||||
except AttributeError:
|
||||
return None
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user