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 Practice Basic Math Calculations in Python!
You have completed Practice Basic Math Calculations in Python!
Preview
Take a user's name and birth year. Safely make that year an integer, then calculate when they'll turn 25, 50, 75, and 100. Tell 'em!
Course
Related Videos
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
Hey there, let's try a bit of Python
practice around taking input from users,
0:00
try and accept blocks, and conditions.
0:00
There's a workspace attached to this
video where you can write your code, or
0:03
you can do it locally by downloading
the workspace through the File menu.
0:06
All right,
let's see what you need to do and
0:11
these instructions are deceptively simple.
0:13
This challenge has three major steps, but
0:16
of course there's probably some minor
steps you'll need to discover on your own.
0:18
First, you need to get input
from the user for their name and
0:21
what year they were born.
0:25
You wanna make sure that they give
you a year that's an integer.
0:26
We don't have Star Trek's
floating point dates just yet.
0:28
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