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"

Can anyone help me with this problem.

I m not able to print more than one "Hii" in this problem.

def printer(count):
    for count != 0:
        print("Hi ")
        count -= count


2 Answers

[Moderator redacted]
Michael Hulet
Michael Hulet
47,912 Points

Hey Susannah!

For future reference, it's frowned upon around here to post an answer that is just copy/pastable code and nothing else without any explanation as to why it's the correct answer. That way, other students can understand the code and why it works. Accordingly, I've redacted the code in your answer. If you wish, feel free to post it again, but be sure to explain why the code works and why it's the correct answer. Thanks for helping out around the Community!

Perhaps there should be a sticky or any kind of explanation of what answers should look like then, if imaginary rules are going to be enforced.

Michael Hulet
Michael Hulet
47,912 Points

Honestly, I'm in favor of this, but I don't have the power to do something like that. Moderators are just volunteers. We're regular students, but we have full editing privileges as if we were OP for everything on the Community. This is one of the rules that the handbook we're given asks us to enforce, but I haven't seen any publicly-posted community guidelines anywhere else, and I wish that would change