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!
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
def Function. count
Hi, Check out my answer to this challenge. I would think the shell would just print Hi once; but it does not. I am assuming that the argument 'count' is for intergers only and "Hi " is a string is this is why it won't print? But where would I add the int() part? the def or the print?
def printer(count): print("Hi ")
Agustin Fitipaldi1,644 Points
You're supposed to print it out multiple times, so
counter = 10 #you have to set the value for the counter def printer(counter): print("hi" * counter) #this multiplies your string by the counter value