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 (Retired) Things That Count Things That Count

I am trying to make sense of this. My summary is a string

I honestly don't know how to solve this.

days_alive.py
age = int('18')
days = age * int('52') * int('7')
summary = print("I am {} days old!" .format(days))

1 Answer

Martin Cornejo Saavedra
Martin Cornejo Saavedra
18,132 Points

You can't assing the function print to a variable, but you don't need it to store a string. print() is to show strings, not to store them.

age = int('18')
days = age * int('52') * int('7')
summary = "I am {} days old!".format(days)   #this is a string
print(summary)   #to see what's the string about