Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Technical Interview Prep: Python Basics Basic Python Take Me Out To The Ball Game

Jake Williams
Jake Williams
2,673 Points

Take me out to the ball game.

The example that I found showed it this way but it is not working.

formatting.py
def cheer(city, teamname):
    return ("Lets go", + city + "  " + teamname + "Let's go!   ")
cheer("Kansas City", "Royals")

1 Answer

Have you tried changing Lets to Let's, go", to go," and adding a period and a space between the teamname and the last string? You could also remove the spaces after the exclamation mark.

The challenge does not ask you to call the function, but if you want to see your function's output, you can use print. Otherwise, calling the function will return the string, but not print it.

Jake Williams
Jake Williams
2,673 Points

Unfortunately it still doesn't want to work. I am at a loss.