## 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.

# tickets_remaining is always 100

each time i run the code the tickets_remaining is always 100

Please post your code (with Markdown formatting); or even better, make a snapshot of your workspace and post the link to it here. Then we can take a look and help figure it out.

Hi Tinotenda,

Can you share your code so that I can review it and help you find the issue?

Cheers!

TICKET_PRICE = 10 tickets_remaining = 100

# Keep runnin code so long as there are tickets for sale

while tickets_remaining >= 1:

# Output how many tickets are remaining using the tickets_remaining variable

```print("There are only {} tickets left!".format(tickets_remaining))

#Gather the user's name and assign it to a new variable

#Prompt the user by name and ask how many tickets they would like.
tickets_requested = int(input("Hey {}, How many tickets would you like to purchase? ".format(username)))

#Calcualte the price and assign it to a variable,
total = tickets_requested * TICKET_PRICE

# Output the price to screen

#Prompt user if they want to proceed Y/N

#If they want to proceed
#print out to screen SOLD!
#and then decrement the tickets remaining
Y = "Y"
N = "N"
confirm = input("Would you like to proceed? ")

if confirm == Y:
print("SOLD!")
tickets_remaining -= tickets_requested

else: print("Thank you {}, Have a nice day!".format(username))
```

print("Tickets are SOLD OUT!")