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 trialJovan Dandridge
12,835 Pointsthis seems to easy yet im not getting it need help what am i missing? i also keep getting syntaxerror
what am i missing???
from django import template
register = template.Library()
def reverse_text("balloon"):
return reversed()
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! Your function must be more generic. The parameter in the function definition should take any string, not just the string "balloon". This was just given as an example. Treehouse is going to send in a string to that function and it should return to Treehouse the reversed string. However, we have no way of knowing what they're sending. Also the reversed() part is incorrect. Take a look:
from django import template
register = template.Library()
def reverse_text(myString):
return myString[::-1]
Here we define a function named reverse_text
that has one parameter for a string. We take that string and return the reversed version of it.
Hope this helps!
Jovan Dandridge
12,835 PointsJovan Dandridge
12,835 PointsYes this helps me understand it a bit further, thank you!