Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Python Dates and Times!
You have completed Python Dates and Times!
Preview
We walk through the creation of a crucial function, `display_age()`, for the Birthday App. We'll utilize Python's `datetime` tools to handle age calculations.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
And we can use what we write here for
some of our other functions as well.
0:00
It looks like the developer
has left us a to do.
0:02
So write code to display
the age of person.
0:05
And they've also left us a template person
is x years x months and x days old.
0:07
Awesome, and we got some print statements.
0:14
We've got this display h function just to
sort of say that we're in here now in this
0:15
function.
0:19
And then we also printing out this person
variable that we're getting through
0:20
this argument right here.
0:24
So let's just run the app and
run this function to see what we get.
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up