Files
exercism_puzzles/python/plane-tickets/HINTS.md
T

815 B

Hints

1. Generate seat letters

  • The returned value should be of type generator.
  • You can have a sequence of letters from A to D and cycle through them.
  • Use yield to return the next letter.

2. Generate seats

  • The returned value should be of type generator.
  • Row 13 should be skipped, so go from 12 to 14.
  • Keep in mind that the returned values should be ordered from low to high. 1A, 1B, 2A, ...
  • Here it might be good to reuse or call functions you have already defined.

3. Assign seats to passengers

  • Make sure your seat numbers do not have any spaces in them.
  • Here it might be good to reuse or call functions you have already defined.

4. Ticket codes

  • You can use len() to get the length of a string.
  • You can use "<string>" * <int> to repeat a string.