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 trialDantee Fluellen
1,499 PointsWrong answer
I have everything right just my answer for one ticket is not coming out right instead of 10 for the price i keep getting 111111. i dont know why
this is my code
TICKET_PRICE = 10
tickets_remaining = 100
output how many tickets are remain using the remaining_tickets variabl
print("There are {} tickets left.".format(tickets_remaining))
gather the users name and assign it to a new variable
full_name = input("What is you full name? ")
promte the user by name and ask them how many tickets you would like
number_of_tickets = input("{}, How many tickets would you like? ".format(full_name)) number_of_tickers = int(number_of_tickets)
cal the price of ticket (number of tickets by the number of tickets) and assign it a new variable
ticket_total = number_of_tickets * TICKET_PRICE
output the price to the screen
print("Amount due is, {}".format(ticket_total))
Jonathan Davidson
1,641 Pointsyou have a spelling error. You put number_of_tickers when converting to an integer instead of number_of_tickets
2 Answers
Dantee Fluellen
1,499 Pointsthanks a lot. can you help me i fix someone else problem with this same issues but not i can seem to fix my owns. https://w.trhou.se/oyka72xeit As you can see in my workspace under pass.py everything works fine. But then when you go to masterticket.py it stay at 100 tickets. All i did was take out the comments so i dont understand what is wrong.
Steven Parker
231,248 PointsThe "if" statement, and the lines it controls, all need to be indented more to place them inside the "while".
Otherwise, the question is being asked but answer is never acted on.
Dantee Fluellen
1,499 PointsOmg thanks
Steven Parker
231,248 PointsDantee Fluellen — Glad to help. You can mark the question solved by choosing a "best answer".
And happy coding!
Steven Parker
231,248 PointsSteven Parker
231,248 PointsWhen posting code, use Markdown formatting to preserve the code's appearance and prevent certain characters from being consumed. An even better way to share code and make your issue easy to replicate is to make a snapshot of your workspace and post the link to it here.