-
Couldn't load subscription status.
- Fork 2.5k
Solution #2862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Solution #2862
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
I am requesting changes because a core requirement is not fully met: the mutable list in sorted_variables contains a duplicated entry, causing the combined lists not to represent exactly the 8 distinct variables. In app/main.py, the mutable list includes collection_of_coins twice (check around the definition of sorted_variables; likely near lines where the lists are assembled). This violates the requirement that each of the 8 provided variables must appear exactly once across the two lists and be categorized correctly.
What to fix:
- Remove the duplicate
collection_of_coinsfrom themutablelist so that themutablelist has exactly the three mutable variables and theimmutablelist has the five immutable variables (total 8 unique entries).
Why this matters:
- Tests and validation expect exactly 8 unique variables split correctly between the two keys "mutable" and "immutable"; the current duplication results in 9 items and fails the core functional check.
Minor suggestion (optional):
- Keep a consistent ordering (e.g., definition order) and consider quick self-checks like asserting the counts (3 mutables, 5 immutables) during development. You’re very close—once the duplicate is removed, the solution should satisfy the requirements.
✨ 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
| sorted_variables = { | ||
| "mutable": [my_favourite_films, | ||
| collection_of_coins, | ||
| collection_of_coins, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mutable list includes collection_of_coins twice. Remove the duplicate so each of the 8 provided variables appears exactly once across the two lists (requirement: lists should include all 8 variables categorized correctly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
I am approving this submission because all requirements are met: sorted_variables exists with exactly the keys "mutable" and "immutable", each value is a list, and all eight predefined variables are included exactly once and correctly classified. The implementation is clear and uses standard Python types appropriately.
Minor, non-blocking improvement suggestions:
- Consider adding simple assertions (e.g.,
len(sorted_variables["mutable"]) == 3,len(sorted_variables["immutable"]) == 5) to guard against future edits inadvertently changing the counts. - A short comment explaining the intent of
sorted_variablescould aid future readers.
Nice work keeping it clean and precise—well done!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.