Skip to content

Commit 78598f1

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in aba71cd according to the output from Autopep8. Details: https://app.deepsource.com/gh/avinashkranjan/Amazing-Python-Scripts/transform/dbdece4d-f18b-41f6-828e-0f9758a0f26e/
1 parent aba71cd commit 78598f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Age_Calculator/Age_Calculator.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from datetime import date
22

3+
34
def calculate_age(birthday):
45
today = date.today()
56

@@ -12,10 +13,11 @@ def calculate_age(birthday):
1213
remaining_months = abs((12-birthday.month)+today.month)
1314
remaining_days = abs(today.day - birthday.day)
1415

15-
# Return the age as a formatted string
16+
# Return the age as a formatted string
1617
age_string = f"Age: {year_diff} years, {remaining_months} months, and {remaining_days} days"
1718
return age_string
1819

20+
1921
if __name__ == "__main__":
2022
print(" Age Calculator By Python")
2123

0 commit comments

Comments
 (0)