Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Python Data Types Age Calculation

Julie Egan
Julie Egan
Courses Plus Student 703 Points

task 1 is no longer passing in age.py

can't figured it out why :(

years x 365
Julie Egan
Julie Egan
Courses Plus Student 703 Points

it went the wrong code, my first time posting sorry, but when I assign years = 39 I pass the first task then on the next one says task 1 no longer passing :(

1 Answer

Chris Howell
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

Hi Juliana Egan

So when you are doing math, you will have to use the Python operators built in to the language to do math operations. I realize when you do math on paper you could use x to represent multiplication, but Python looks at x like its just another variable. To do multiplication in Python you would use the asterisk(*)


So if i wanted to multiply 20x20 and store it in a variable called twenties:

twenties = 20 * 20

You can look up others in Python Docs for Operations