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 trialAlexandra Ciorra
Python Web Development Techdegree Student 796 PointsCan't find correct answer!!!!
I have typed over and over. I have read the teacher notes. Looked up questions. Watched the video over and over again. Why can't I get the right answer. Can someone please explain the correct answer. When I put in in python it works but i can't get passed this question!
del printer(count):
print("Hi" * 10)
Alexandra Ciorra
Python Web Development Techdegree Student 796 PointsThanks everyone for your answers I really appreciate the help but I'm still getting it wrong with del printer(count): print("Hi " * count)
2 Answers
furkan
11,733 Pointsyou need to do the following:
def printer(count):
a_string = ("Hi" * count)
return a_string
printer(3)
You define function with use of the keyword def.
furkan
11,733 PointsIf it asks you to avoid calling the function then just remove the printer(3) at the end
Andrea Bell
5,167 PointsIt is def not del.
Andrea Bell
5,167 PointsAndrea Bell
5,167 Pointsdef printer(count): print("Hi" * count)
You put del and it is def. count is a variable = to any number you pass into the function.