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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![ja5on](https://uploads.teamtreehouse.com/production/profile-photos/11535073/micro_Sprockets.jpg)
ja5on
10,338 PointsThis lesson and last lesson are a bit hard to understand..
Are their any smaller programs that do the same thing...I've gone word blind, and very confused.. Feel like i've missed an entire course between these few lessons
4 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsPerhaps you just need a break to recover from mental exhaustion. There's actually a course here on How to Learn, it's full of suggestions on ways to overcome common issues folks face when trying to learn lots of new things quickly.
There's also an episode of The Treehouse Show that discusses an experience students have called "hitting the wall", and how to manage it. The instructor even quotes me at one point.
![Alyssa Wren](https://secure.gravatar.com/avatar/0e0c07bc12987b5ebb1c10e8efcb1b76?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Alyssa Wren
1,757 PointsI completely agree and it has nothing to do with mental exhaustion- I found every lesson up to this point extremely easy to understand and was getting 100% on the quizzes. This lesson was hard to follow and I felt many concepts were introduced and glossed over far too quickly
![ja5on](https://uploads.teamtreehouse.com/production/profile-photos/11535073/micro_Sprockets.jpg)
ja5on
10,338 PointsAlyssa Wren & Luis Cardenas Hello to you both, I just want to say although its difficult at times learning at Treehouse I find that Treehouse does a good job to guide me in the right direction but occasionally the above does happen and at time like these I refer to books - I know I shouldn't have to but I do. In this case I've brought a book called Python by Mike McGrath and once I've learnt the missing links as it were I will go back to Treehouse and continue to learn from them. Hope that helps, and don't give up!!! All the best, Jason.
![Luis Cardenas](https://uploads.teamtreehouse.com/production/profile-photos/11685358/micro_yo.jpg)
Luis Cardenas
1,501 Pointssame here :/
![ja5on](https://uploads.teamtreehouse.com/production/profile-photos/11535073/micro_Sprockets.jpg)
ja5on
10,338 PointsAlyssa Wren & Luis Cardenas Hello to you both, I just want to say although its difficult at times learning at Treehouse I find that Treehouse does a good job to guide me in the right direction but occasionally the above does happen and at time like these I refer to books - I know I shouldn't have to but I do. In this case I've brought a book called Python by Mike McGrath and once I've learnt the missing links as it were I will go back to Treehouse and continue to learn from them. Hope that helps, and don't give up!!! All the best, Jason.
![Michael Jacoby](https://uploads.teamtreehouse.com/production/profile-photos/10739918/micro_brain_edit2.jpg)
Michael Jacoby
Full Stack JavaScript Techdegree Student 3,793 PointsHi Steven and others,
I equally found this portion of learning difficult and I don't think it's burnout or hitting the wall.
If you rewatch this video, you'll see that Craig shows us that when 0 is typed in (for number_of_users), a ZeroDivisionError is generated. He doesn't really explain the purpose of raising an exception and it really doesn't even seem to work properly. He certainly makes it seem more difficult to raise the ValueError.
After watching his video and practicing, I don't even see how raising an exception is beneficial.
Rather than put a ZeroDivisionError in the try block, he explains that nobody should be typing in 0 for number_of_users, so...
1) He has a ValueError in his try block 2) Raises another ValueError in the function (with an if statement), and when it's still not outputting properly... 3) He moves amount_due from else to within the try block Finally, when it's still not outputting the error message he raised (in the function), 4) He adds "as err" to his ValueError and adds a 2nd print statement: print("({})".format(err))
Yeah, I think that's all pretty confusing.
So I put all this to the test and my simple solution is to add a ZeroDivisionError to the try block. I get it, nobody should be typing in 0 for number_of_people, but it seems like Craig went through a lot of work and I'm not sure if he was not fixing it along the way on purpose - for training purposes - or if he was tripped up. But it is confusing.
Here is my code. Note that I used amount_of_people (not number_of_people), so don't be confused there.
import math
def split_check(total, amount_of_people):
# if amount_of_people <= 1:
# raise ZeroDivisionError("zip dude")
# if amount_of_people <= 1:
# raise ValueError("Dude")
return math.ceil(total/amount_of_people)
try:
total_due = float(input("Total? "))
amount_of_people = int(input("amount_of_people? ")) # 0 people generates a ZeroDivisionError, but 0 is not possible, so they typed wrong.
amount_due = split_check(total_due, amount_of_people)
except ValueError: # This is where Craig put as err and added a 2nd print statement (as mentioned above)
print("Value Error") # in conjunction with the raised exception (I commented out), that's how Craig got his text to output)
except NameError:
print("Name Error")
except ZeroDivisionError: # I used this. Seems simpler.
print("Zero Div Error")
else:
print("Each person owes ${}".format(amount_due))
Steven Parker
230,688 PointsSteven Parker
230,688 PointsHaving "gone word blind" sounds pretty serious, so exhaustion seemed like a likely cause.
But in any case, you can expect that some concepts will be more challenging to master than others, and the tips in the learning videos might be helpful.