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)
![Wes Davis](https://secure.gravatar.com/avatar/d3faab83ee2d21e09264356cc66ceb91?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Wes Davis
2,270 Pointsmissing error requirement
just fyi, one error that is missing from this is if the users selects 0 tickets.
The price comes back as "2" which is 0 * 10 + 2.
There should be an additional error raised if the user tries to purchase 0 tickets.
ticket_quantity = int(ticket_quantity)
if ticket_quantity > tickets_remaining:
raise ValueError("There are only {} tickets remaining.".format(tickets_remaining))
if ticket_quantity < 1:
raise ValueError("You must select at least one(1) ticket.")```
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsGood enhancement! But please edit your code and add Markdown formatting to preserve the code's appearance (particularly indentation).
Craig might have left this intentionally for sharp-eyed developers to further practice their skills. Even if not, you'll find that many of the example programs in the courses can benefit from well-conceived enhancements.