Welcome to the Treehouse Community
Looking to learn something new?
andhika pratikto995 Points
Write a function named printer. The function should take a single argument, count, and should print "Hi " as many times as the count argument. Remember, you can multiply a string by an integer.
which part i did wrong can someone please tell me
def printer(count): print("Hi ") printer(2)
Ryan S27,275 Points
You have the printing aspect of the function correct, however you need to use the
count variable to multiply the string.
Here is a hint on how string multiplication works:
>>> "Hi " * 3 'Hi Hi Hi'
You don't have to call the function yourself. The code checker will do that for you and pass in its own integer. You just need to handle that integer as the
Let me know if you need more help.