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"

[SOLVED] Whats the problem of my code?

Hi

I tried to solve this task, I tried this code but it wont work, what happen?

def printer(count)
       print("Hi {}".format(count)

printer("Hello")

Thanks

Hi dfk xcm, I've updated your question to indicate that you've figured it out. Can I suggest that you share your solution here in case other people are having a similar issue?

Also, I wrapped your code in a code block. Refer to the Markdown Cheatsheet (linked from below each text box used for entering a question/comment/answer on the forums) for instructions on how to format things in a code block.

2 Answers

This is the code I used to solved the challenge

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

Thanks

Hi!

Looks like you are using a method called 'printer'. Is this right? Take a look back through the video and you will soon see the problem :)

I hope this helped you out!

I already solved, thanks :D

That was very quick, great job!