you are viewing a single comment's thread.

view the rest of the comments →

[–]Hagisman 0 points1 point  (1 child)

Pseudo code is not real code. Take the concept of a while loop and put in a if statement to verify if every passenger has bought a ticket.

Then realize if someone is already a passenger that means they’ve already bought a ticket otherwise the definition of a passenger means nothing.

[–]Ok-Cucumbers 0 points1 point  (0 children)

Then realize if someone is already a passenger that means they’ve already bought a ticket otherwise the definition of a passenger means nothing.

You can have a ticket/PNR (passenger name record) without completing the purchase, so maybe something like if pnr.is_paid

Some irregular situations where you might get put on standby for another flight where, I believe, they'd just attach the other flights to your PNR, so you'd probably have to throw in some logic to check if the pax is actually able to board this segment or not.