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 Python Basics (2015) Logic in Python Print "hi"

Jonathan Whelchel
Jonathan Whelchel
2,096 Points

Im so stupid...I feel like the videos aren't preparing me well for the code challenges. I'm so lost again. please help

Please help. I yet again have no clue what to do

printer.py
def printer(count):
        for hi in printer:
            print("Hi ")

1 Answer

Andrew Kiernan
Andrew Kiernan
26,892 Points

Hi Jonathan!

Don't get so down on yourself! I originally tried to answer this the same way you did and couldn't figure out where I was going wrong.

The question gives you a hint as to how to answer. It says "Remember, you can multiply a string by an integer." So all you need to do in your function is

def printer(count):
    print("Hi " * count)

and that should do it!