Skip to content

Commit

Permalink
Merge pull request #1451 from LLkaia/update/clarify_desc
Browse files Browse the repository at this point in the history
  • Loading branch information
sergii-nosachenko authored Oct 25, 2024
2 parents 8256ec5 + 3a08af9 commit 34368d1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 11 deletions.
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ package create modules:
This class should have only one static method `sell_product`,
that takes `product` - name of the product that customer wants
and `customer` - `Customer` instance, that means customer.
This method prints what product and to whom cinema sold.
The `sell_product` method sells a product to the customer and displays which product was sold and to whom.


```python
cb = CinemaBar()
Expand All @@ -25,14 +26,15 @@ package create modules:

- `hall.py` - inside this module create `CinemaHall`
class that describes actions during the movie session. Its
`__init__` method takes and stores `number` - number of the hall
in cinema.
`__init__` method takes and stores ONLY the `number `of the hall in the cinema.
This class should have only one method `movie_session`, that
takes `movie_name`, `customers` - list of a customers
(`Customer` instances), `cleaning_staff` - cleaner (`Cleaner`
instance). This method prints about movie start, calls
customers method `watch_movie`, prints about movie end,
calls cleaner method `clean_hall`.
calls cleaner method `clean_hall`. So, we are expecting
that everything listed above will be performed in `movie_session` function.

2. In directory `app` create package `people`. In this package
create modules:
- `customer.py` - inside this module create `Customer` class,
Expand All @@ -47,7 +49,7 @@ package create modules:
# Bob is watching "Madagascar".
```

- `cinema_staff` - inside this module create `Cleaner` class,
- `cinema_staff.py` - inside this module create `Cleaner` class,
its `__init__` method takes and stores `name`.
This class should have only one method `clean_hall`, this method
takes `hall_number` - number of hall that cleaner have to clean and
Expand All @@ -68,12 +70,14 @@ customer, `hall_number` - number of the hall in cinema,
`cleaner` - name of the cleaner, that will clean the
hall after movie session.

This function should make `Customers` instances, instance of `CinemaHall`
and `CinemaBar`, instance of `Cleaner`. First, cinema bar should sell food to
customers, then cinema hall should make a movie session and finally cleaner
cleans cinema hall.
This function should create instances of `Customer`, `CinemaHall`, and `Cleaner`.
First, the cinema bar should sell food to customers. To do this, you can use the `CinemaBar`
class without creating an instance. Then, the cinema hall should schedule a movie session,
and finally, a cleaner should clean the cinema hall. We expect each class to work with the provided data,
accepting parameters in the correct order and having the necessary methods.
No additional checks or error handling are needed!

Example:
Example (do not add it to `main.py`):
```python
customers = [
{"name": "Bob", "food": "Coca-cola"},
Expand All @@ -82,7 +86,7 @@ customers = [
hall_number = 5
cleaner_name = "Anna"
movie = "Madagascar"
cinema_visit(customers=customers, hall_number=5, cleaner="Anna", movie="Madagascar")
cinema_visit(customers=customers, hall_number=hall_number, cleaner=cleaner_name, movie=movie)
# Cinema bar sold Coca-cola to Bob.
# Cinema bar sold popcorn to Alex.
# "Madagascar" started in hall number 5.
Expand All @@ -91,3 +95,8 @@ cinema_visit(customers=customers, hall_number=5, cleaner="Anna", movie="Madagasc
# "Madagascar" ended.
# Cleaner Anna is cleaning hall number 5.
```

**Important Note**: Each method responsible for performing a task should only print a message using
the `print()` function. There is no need to return anything or use the `logging` module.

Finally, check your code using this [checklist](checklist.md) before pushing your solution.
31 changes: 31 additions & 0 deletions checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Check Your Code Against the Following Points

1. If the function definition line is too long, place each parameter on a new line.

**Good example:**
```python
def long_function_name(
var_one,
var_two,
var_three,
var_four
) -> None:
```

**Bad example:**
```python
def long_function_name(var_one, var_two,
var_three,var_four) -> None:
```

2. Only use absolute imports.

**Good example:**
```python
from app.module import Component
```

**Bad example:**
```python
from .module import Component
```

0 comments on commit 34368d1

Please sign in to comment.