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 trialLewis Mansbridge
1,119 PointsHi there, i thought my understanding was goin well on this but maybe not, please can i have some help thanks
Hi there, i thought my understanding was goin well on this but maybe not, please can i have some help thanks
def printer(count):
if count >= 0:
print("Hi " * count)
count -= 1
count = 5
printer()
2 Answers
Lewis Mansbridge
1,119 PointsI didnt mean to put the * count in the print bit that was me experimenting
Vlad Dyagilev
9,625 PointsYou called the printer function without the variable inside the brackets. To do you would need to call printer(count). Also your printer function is incorrect. All you needed to do was write print("Hi " * count)