Python Python Basics All Together Now Gather Information

mohan Abdul
PRO
mohan Abdul
Pro Student 1,391 Points

project 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
Steven Parker
182,578 Points

I think the idea is to show the user the number of remaining available tickets before asking for the quantity desired.

mohan Abdul
mohan Abdul
Pro Student 1,391 Points

Steven 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
Steven Parker
182,578 Points

Your 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
mohan Abdul
Pro Student 1,391 Points

Hi 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
mohan Abdul
Pro Student 1,391 Points

Hi 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