From ffc4ff5c4664b4a2c7268b54190247e21fed855c Mon Sep 17 00:00:00 2001 From: BethanyG Date: Fri, 15 May 2026 01:40:12 -0700 Subject: [PATCH] Corrected typos and formatting errors in plane tickets exercise. --- exercises/concept/plane-tickets/.docs/instructions.md | 4 ++-- exercises/concept/plane-tickets/.meta/exemplar.py | 3 ++- exercises/concept/plane-tickets/generators.py | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/exercises/concept/plane-tickets/.docs/instructions.md b/exercises/concept/plane-tickets/.docs/instructions.md index edd92680b1d..7584c53f38e 100644 --- a/exercises/concept/plane-tickets/.docs/instructions.md +++ b/exercises/concept/plane-tickets/.docs/instructions.md @@ -75,10 +75,10 @@ The function should then return a _dictionary_ of `passenger` as _key_, and `sea Conda Airlines would like to have a unique code for each ticket. Since they are a big airline, they have a lot of flights. This means that there are multiple flights with the same seat number. -They want you to create a system that creates a unique ticket that is _12_ characters long string code for identification. +They want you to create a system that formulates a unique ticket that is a _12_ character long string. This code begins with the `assigned_seat` followed by the `flight_id`. -The rest of the code is appended by `0s`. +The rest of the code is filled with `0s`. Implement a function `generate_codes(, )` that accepts a `list` of `seat_numbers` and a `string` with the flight number. The function should then return a `generator` that yields a `ticket_number`. diff --git a/exercises/concept/plane-tickets/.meta/exemplar.py b/exercises/concept/plane-tickets/.meta/exemplar.py index 29d6c1561d2..498a54e6cbe 100644 --- a/exercises/concept/plane-tickets/.meta/exemplar.py +++ b/exercises/concept/plane-tickets/.meta/exemplar.py @@ -39,7 +39,7 @@ def generate_seats(number): There is no row 13, and each row has 4 seats. Seats should be sorted from low to high. - For exampl: 3C, 3D, 4A, 4B + For example: 3C, 3D, 4A, 4B """ @@ -72,6 +72,7 @@ def assign_seats(passengers): output[passenger] = seat_number return output + def generate_codes(seat_numbers, flight_id): """Generate codes for a ticket. diff --git a/exercises/concept/plane-tickets/generators.py b/exercises/concept/plane-tickets/generators.py index db7b3270552..c55dc9434d2 100644 --- a/exercises/concept/plane-tickets/generators.py +++ b/exercises/concept/plane-tickets/generators.py @@ -34,12 +34,13 @@ def generate_seats(number): There is no row 13, and each row has 4 seats. Seats should be sorted from low to high. - For exampl: 3C, 3D, 4A, 4B + For example: 3C, 3D, 4A, 4B """ pass + def assign_seats(passengers): """Assign seats to passengers. @@ -54,6 +55,7 @@ def assign_seats(passengers): pass + def generate_codes(seat_numbers, flight_id): """Generate codes for a ticket.