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 trialTerry Joseph
Courses Plus Student 413 PointsHaving some trouble
I know im wayy off but could i get some help?
def printer(count):
print("Hi") * {} .format(count)
1 Answer
Amitesh Singh Baghel
2,256 PointsSorry I didn't read the answer. I thought u were trying to put name with Hi. My mistake. I saw the challenge. You need to print hi. So, try this code below. def printer(count): print("Hi"*count) when a string is multiplied with a int, the print function prints the string as many times as the value that count contains. I apologize for the mistake, hope this helps
Terry Joseph
Courses Plus Student 413 PointsTerry Joseph
Courses Plus Student 413 Pointswhen i did that i got NameError: name 'printer' is not defined
Amitesh Singh Baghel
2,256 PointsAmitesh Singh Baghel
2,256 PointsI edited the answer above, if u have any doubt, feel free to ask me.
Terry Joseph
Courses Plus Student 413 PointsTerry Joseph
Courses Plus Student 413 PointsThanks it helped a lot i understand now
Terry Joseph
Courses Plus Student 413 PointsTerry Joseph
Courses Plus Student 413 Pointscan you look at my most recent post
Amitesh Singh Baghel
2,256 PointsAmitesh Singh Baghel
2,256 PointsI have answered you question in post but I could not format it. Do u know how to do the formatting