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

Python Python Basics (2015) Logic in Python Try and Except

Dane Burke
Dane Burke
2,157 Points

Is there a way to get to get help (answers) to code challenges without having to ask and wait?

I realize the benefit of trudging along via trial and error in most cases and I've done that up to this point. But, it can be extremely frustrating when the code challenge seemingly is asking me to extrapolate already unfamiliar concepts in order to complete it. It's not extremely helpful to repeatedly be told "bummer, try again."

trial.py

3 Answers

In TTH, best way to learn something completely is watching the videos until you understand all of the mentioned concepts.

Another option is consulting google. Probably, someone have faced your problem before.

Last option is asking yourself.

def add(a, b):
  try:
    a = float(a)
    b = float(b)
  except ValueError:
    return None
  return a + b
Dane Burke
Dane Burke
2,157 Points

Thanks for your response. I've rewound most videos probable 25-30 times, lol. You're obviously much more advanced, as I would have never written it that way since the challenge says to use "else" and no where in the python track so far have I seen the arguments (a and b) broken up like that. I guess that's the nice thing and frustrating thing about coding, multiple methods possible.

In programming, there are unlimited possibilities. That's because everybody thinks differently.

Asking is the best way.

John Goldring
John Goldring
634 Points

Dane,

I too am struggling with this! I'm not sure why TTH doesn't have a "hint" button or anything to help users understand why our challenge code isn't working. It's really frustrating and time consuming to have to ask a forum for help on a challenge