Python Python Basics All Together Now Branch and Loop

Using for loops instead of while loops

I have done the same steps that is shown in this video but I tried to use the for loop instead of the while one, but it says to me that I have a syntax error I don<t understand the reason

Hi Mark,

Can you please provide your code? We can't really help much without seeing your code. Also, it may help to provide the error. Remember to use the proper markdown to show your code. Refer to the Markdown Cheatsheet below the answer box.

You would have to use a range when using a for loop and make sure that the for loop does not continue beyond when the number of tickets is less than zero.

The trouble is that if you are prompting the user for the number of tickets to purchase in each iteration of the for loop, the number of loops required to exhaust the supply of tickets is unpredictable - somebody could buy all tickets at once for example.