Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions agecalulator/agecalculator1.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
now = date.today()
age = now - birthday

print "You are %d years old " % (age.days / 365)
print "You've lived %d days" % (age.days)
print(f"You are {age.days / 365} years old")
print(f"You've lived {age.days} days")

except ValueError, err:
print 'ERROR:', err
except ValueError as err:
print(f"ERROR: {err}")