0
seats = 10# initial number of seats while seats > 0: # seat available? print("Sell ticket") # ticket sold seats = seats - 1
Explain it to me..
1 ответ
+ 4
inital number of seat is '10'
while seats>0: (which means 10>0)
Now, if seat available then print 'sell ticket' and then decrement of seat, means seats=seats -1
(which means 10-1=9)
Now, again same process
while seats>0: (which means 9>0)....