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 trial

Python

My code won't restart for a new customer.

My code won't restart for a new customer, instead it will ask the name question bout if you want to purchase the same amount under the same name.

https://w.trhou.se/7ewti1inry

2 Answers

Steven Parker
Steven Parker
231,248 Points

As I mentioned in my answer to your previous question, you might want to take a look at this video about Posting a Question for hints about referencing a course and lesson.

But the code that asks for name and ticket quantity runs only once since it happens before the loop. If you want these questions to be asked again, that part of the code should be moved inside the loop.

Daniel Mula Taranc贸n
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Daniel Mula Taranc贸n
Full Stack JavaScript Techdegree Graduate 37,873 Points

Hi Kurt,

You should put your main code inside the while loop so the app is able to restart again and ask you again for the same data. I hope this hint will help you to solve it. Otherwise, ask me if you can't.

Cheers.