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 trialAmmar Mazhar
1,015 PointsThe code won't run
For some reason every time I try to run my code by calling the file to run " python masterticket.py" the code won't run and the cursor starts a new line without any error notifications. How may I fix that problem ?
5 Answers
Steven Parker
231,269 PointsIf you get no errors, it's quite likely that the code did run, but it did not produce any output before it finished.
If you'd like us to be able to check for certain, make a snapshot of your workspace and post the link to it here.
Kathy Kinsella
1,306 PointsI am running the masterticket.py program and even though I tell it to thank them by name at the sale, the code does not do this. what am I doing wrong? here is my snapshot https://w.trhou.se/bofrjcof1q
Kathy Kinsella
1,306 PointsHow is it that it is doing one thing for you and something different with you? It's not confirming the name
Kathy Kinsella
1,306 PointsI see that it is confirming the name but it is not thanking them by name. I thought this script was supposed to thank the buyer by name
Steven Parker
231,269 PointsThe line "print("Thank you anyways, {}!".format(name))
" is only used when the user does not proceed after being told the price. I didn't select that option in the example, but it does work also.
Kathy Kinsella
1,306 PointsOH, I didn't understand that. But yep it does work. thanks for the help
Steven Parker
231,269 PointsKathy Kinsella — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!
Steven Parker
231,269 PointsSteven Parker
231,269 PointsI made a fork (working copy) of your snapshot, and it seemed to work as expected:
Looking at the code, I noticed that the indentation on lines 17-20 was not consistent with the rest of the program, but it did not seem to cause an issue.