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 trialNuzul Hafizi Mohd Arif
556 Pointsdef printer(count): print("Hi {}".format(count)*10) printer('')
output: Hi Hi Hi Hi Hi Hi Hi Hi Hi Hi
but still wrong.
def printer(count):
print("Hi {}".format(count)*10)
printer('')
1 Answer
Steven Parker
231,275 PointsThe instructions say that the function "should print "Hi " as many times as the count
argument".
But the code here always prints 10 times, and prints the argument as part of the output. So if the challenge were to test it by calling "printer(5)
" the output would be: "Hi 5Hi 5Hi 5Hi 5Hi 5Hi 5Hi 5Hi 5Hi 5Hi 5
".
Cam Treschuk
7,378 PointsCam Treschuk
7,378 PointsYou don't need to call the function printer in the challenge. Also, you don't need to print count with Hi. Your code should look like this:
Hope this helps!