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 trialBenjamin Kuijs
17,022 PointsPython for File Systems, Challenge Task 2 of 2. I keep getting Bummer! Can't find `absolute`
Hi fellow Treehouse members,
I've been trying multiple solutions to solve this code challenge.
Unfortunately i keep returning to Bummer! Can't find absolute
of Task 1 is no longer passing.
What am i doing wrong based on the code you see?
KR
Benjamin
import os
os.path.isabs("home/projects/absolute");
3 Answers
Jennifer Nordell
Treehouse TeacherHi there! Here's what I see so far that's incorrect. The challenge asks you to create a function named absolute
which accepts two string arguments. One string holds the path and the other holds the root. So far you have not defined a function. You need to define a function named absolute
or you will continue to get the error that the checker cannot find the function it is looking for.
Hope this helps!
Benjamin Kuijs
17,022 PointsHi Jennifer,
Thank you for the reply!
So i should add something like:?
function absolute ("path","root") { }
Jennifer Nordell
Treehouse TeacherHi Benjamin Kuijs Well, not exactly. It most definitely needs to be in Python syntax. What you've written is something like I'd expect to see in Java/JavaScript/C# etc.
Also, the parameters are just like in the other languages that I mentioned above. They are local variable names to be used within the function. They are going to accept arguments coming in. But you've written string literals. One thing that will be sent is the path and the other will be the root.
I would suggest you review the syntax for making Python functions/methods first
Benjamin Kuijs
17,022 PointsMaybe i should start with Python Basics first before I start with Python for File Systems.
Thank you for your feedback! I like the style of giving hints so you have to think twice about the steps you've taken. :)
I'll start with Python Basics and follow up on this course afterwards.