Skip to content

cinema visit#2549

Open
andrearantes wants to merge 6 commits intomate-academy:masterfrom
andrearantes:master
Open

cinema visit#2549
andrearantes wants to merge 6 commits intomate-academy:masterfrom
andrearantes:master

Conversation

@andrearantes
Copy link

verify task

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

You've done an excellent job implementing the individual classes like CinemaBar, CinemaHall, Customer, and Cleaner. They all meet the requirements perfectly.

However, changes are needed because the main.py file is missing from your submission. This file is critical as it should contain the cinema_visit function, which orchestrates the entire simulation by creating instances of your classes and calling their methods.

Please add the main.py file and implement the cinema_visit function as described in the task instructions. Once that's in place, your project will be complete!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Great work on implementing all the classes and the main simulation logic! Your code is very well-structured and correctly follows the requirements.

This requires a small change because there's a single linting error that's causing the automated checks to fail. In app/main.py, the cinema_visit function is missing its return type annotation.

To fix this, please add -> None to the function signature, since it doesn't return a value.

# In app/main.py
def cinema_visit(movie: str, customers: list, hall_number: int, cleaner: str) -> None:
    # ... function implementation

Once you add this type hint, everything should pass. You're very close to finishing!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Great job implementing all the required classes—they are well-structured and meet the requirements perfectly! I am approving your solution as an educational override so you can move forward, but there are a few important issues in app/main.py that you should review and correct.

Your code is currently crashing due to an AttributeError. This is because you are accessing items from the customers list of dictionaries using attribute notation (e.g., customer.name) instead of key notation (e.g., customer['name']). Additionally, the cinema_hall.movie_session() method is called twice, which will cause the output to be duplicated. Finally, please reformat the cinema_visit function signature to place each parameter on a new line for readability, as outlined in [CHECKLIST ITEM #1].

Addressing these points will make your solution fully correct. Keep up the fantastic work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment on lines +7 to +8
def cinema_visit(customers: list, hall_number: int, cleaner: str, movie: str)\
-> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This violates checklist item #1: 'If the function definition line is too long, place each parameter on a new line.' Please format the function signature according to the example in the checklist for long function definitions.

Comment on lines +9 to +10
instances_customers_list = [Customer(customer.name, customer.food)
for customer in customers]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The customers parameter is a list of dictionaries, as stated in the task description. To access a customer's details, you'll need to use dictionary key access (e.g., customer['name']) rather than attribute access (customer.name).

Comment on lines +19 to +20
cinema_hall.movie_session(movie,
instances_customers_list, cleaner_instance)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The movie session is being called a second time here. The simulation should only run the session once per visit. Please remove this duplicate call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants