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 trialianmckellar
4,344 PointsI must not know what they're asking..
So it works in eclipse, and I must say I am very happy about the bit of code I wrote.
Earlier I had similar code that required me to use a number for count, I choose 3 and it worked fine.
What do they want?
3 Answers
Nathan Tallack
22,160 PointsWhat they are trying to do here is show you that you can multiply strings when using the print function.
So your code could look like this.
def printer(count):
print("Hi " * count)
Take note of the space after the Hi inside the quotation marks. :)
ianmckellar
4,344 PointsAh, I guess I was over complicating it then. Thankyou! :)
John Goldring
634 PointsHi, I have been stuck on this challenge. My code:
def printer(count):
print(count * "Hi ")
would not work. Could you briefly tell me why challenge doesn't like it the other way around?