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 trial

General Discussion

How does Treehouse grade things for code challenges?

I am doing the Object Oriented Python course. I have had several cases where I literally type the right code into the Treehouse IDE and it does not pass. So I keep trying and refactoring and it still does not pass.

Then I try a few things that don't always work either:

  1. I refresh the page and then submit and it might pass
  2. I remove what I typed and retype it from scratch and it might pass
  3. I completely remove all code from previous exercises and retype EVERYTHING and it might pass.

All this and the original code that I typed in was actually correct...and Treehouse just wasn't accepting it for some strange reason; so I am not sure what Treehouse is doing or how it grades the code that is typed into its IDE.

Honestly, this is getting really frustrating and old...how can I streamline this and make it stop? It's annoying.

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hey Derek,

Code challenges are very specific and extremely strict, and the instructions need to be followed to-the-letter.
If there is a misspelled word, an extra space, missing punctuation, the wrong string, misnamed variable, etc, then the code checker will fail the task.

Honestly, more often than not, it really is something wrong with the code being submitted that an actual problem with the code checker engine. Just because the code works locally or is 100% correct in syntax does not mean it will pass the challenge if it isn't what is being asked for.
When you encounter something that gets you stuck. Click the "Get Help" button on the challenge screen. Follow the prompts and make sure "include code" box is checked. This will post to the Community and directly link to the specific challenge you are on. It will post the code you are trying as well. This will allow the Community to help you troubleshoot and find the error.

Coding in Real Life is just as specific and picky, which is probably why the Treehouse Code Checker engine is just as picky. Real-life situations for Real-life training is one thing I really admire about Treehouse.

Keep Coding! :) :dizzy:

Thanks for the response!

Sometimes, I literally change nothing in the code and it suddenly passes after several attempts at submitting...I usually do one of the three things I listed above and it eventually passes without me changing a thing.

All of my issues so far where I have posted to the community, the people that helped me used the exact code that I included and passed the challenges. All I had to do then, was refresh the page or retype what I already wrote, and it passed too after not being able to pass earlier.

I do not understand how to stop this from happening. It's happened several times already. Please see some of my other posts where I questioned my code and why it was not working. It will give you an idea of what kind of issue I seem to be experiencing. I am not sure how to do things differently to prevent this.

I guess it has allowed me to figure out several ways of typing and achieving the same thing with code, so that's a plus. :)