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 trialShashi Kumar
134 Pointswhat does this error in treehouse practice challenge mean first task is not passing
why am i not able to clear the task with my code
def first_and_last_4(word):
word1 = word[0:4]
word2 = word[-4:]
word3 = word1 + word2
return word3
1 Answer
Steven Parker
231,248 PointsDid you see the notice that said "Important: In each task of this code challenge, the code you write should be added to the code from the previous task."?
It looks like you may have accidentally removed the function you had made for task 1 while working on task 2. The new function itself seems OK.
Darren Kearney
4,506 PointsGood point!
Darren Kearney
4,506 PointsDarren Kearney
4,506 PointsI am not sure why. I tested your code in my machine and it produced the results I expected.