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) 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!