Python Python Basics (2015) Python Data Types Age Calculation

Hmmm. I was pretty sure I had this right

I thought this was right
years = int(47)
years = 47 * 365
days = years - 365

1 Answer

Steven Parker
Steven Parker
134,499 Points

The instructions say to "multiply years by 365 and assign it to the variable days", but this code assigns the result of that calculation to "years" instead.

Also, the value "47" is already an integer, so it doesn't need to be passed to the "int" function. And when multiplying, use the variable "years" instead of repeating the value assigned to it.