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 trialmohan Abdul
Courses Plus Student 1,453 Pointsproject monty python tickets, first step output using variable "tickets_remaining."
the first task is to '# output how many tickets are remaining using the tickets_remaining variable'.
So what did i do? https://w.trhou.se/3xyxdne1dh
1 Answer
Steven Parker
231,248 PointsI think the idea is to show the user the number of remaining available tickets before asking for the quantity desired.
mohan Abdul
Courses Plus Student 1,453 Pointsmohan Abdul
Courses Plus Student 1,453 PointsSteven Parker, this is the teachers version: https://w.trhou.se/txbd5q3y5t. Here is my version: https://w.trhou.se/o5du7exy3u. Is there any draw back to my methods?
Steven Parker
231,248 PointsSteven Parker
231,248 PointsYour code is doing a slightly different job than the original, that part might be considered simply a design decision. If your role is both designer and implementer, it's your choice.
But from a strictly implementation viewpoint, it doesn't do the tasks that were asked for in the original design. So if your role is to implement someone else's design (possibly your employer's), this might not be acceptable.
mohan Abdul
Courses Plus Student 1,453 Pointsmohan Abdul
Courses Plus Student 1,453 PointsHi Steven Parker i have glitch with 'Branch and Loop' video of the project, I am on the first step of the video here is a snapshot of my coding on the file (branching_draft.py): https://w.trhou.se/kyhd4omhjw . For line 17 in repl shell it reads back - ' your order has been confirmed for Qty 5 and price Y'. Instead of print 'Y' it should print the total value of tickets, what have i done wrong? Thank you Steven. Also happy new year. (i
mohan Abdul
Courses Plus Student 1,453 Pointsmohan Abdul
Courses Plus Student 1,453 PointsHi Steven Parker, problem solved on line 15 for the input sting i initially tried giving it a complete new variable name but it wouldn't run through the shell. i must have done a typo and not realised. Which led me to this error, i thought the error was due to the variable not being mentioned before as it came up with 'name error' or 'not defined'. so i tied the new variable """confimation""" to line 11. Thus the input returns the answer and thus losing the entry in line 11 when it goes below line 15. here's what it should have been on first try its alittle messy i should have used "else": https://w.trhou.se/mbrzpl7t3n