We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfa4e56 commit 912d663Copy full SHA for 912d663
Age_Calculator/Age_Calculator.py
@@ -9,10 +9,10 @@ def calculate_age(birthday):
9
10
day_check = ((today.month, today.day) < (birthday.month, birthday.day))
11
year_diff = today.year - birthday.year - day_check
12
- remaining_months = abs((12-birthday.month)+today.month)
+ remaining_months = abs((12-birthday.month)+today.month)
13
remaining_days = abs(today.day - birthday.day)
14
15
- # Return the age as a formatted string
+ # Return the age as a formatted string
16
age_string = f"Age: {year_diff} years, {remaining_months} months, and {remaining_days} days"
17
return age_string
18
0 commit comments