Solve the problem#3611
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because the current sorted_variables dictionary still violates key task requirements and checklist items. The variables are not correctly grouped by mutability: mutable types (my_favourite_films, marks, collection_of_coins) must all be inside sorted_variables["mutable"], while all immutable types (lucky_number, pi, one_is_a_prime_number, name, profile_info) must be inside sorted_variables["immutable"] [CHECKLIST ITEMS #3–5]. Right now, your "mutable" list includes immutable variables and omits collection_of_coins, and your "immutable" list is missing several required immutable variables, so not all 8 variables are properly classified. To fix this, rearrange the lists so each variable appears exactly once, in the correct list according to its type (int, float, bool, str, tuple → immutable; list, dict, set → mutable). In addition, there is a flake8 issue on app/main.py line 20 where the line exceeds 79 characters; break that line into two or more shorter lines to satisfy the style requirement. Once these issues are corrected, your solution will align with the task’s mutability grouping requirements and should pass the checks. Keep going—you’ve already set up the structure correctly, and you just need to adjust the contents and fix the line-length style issue.
✨ 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
|
|
||
| # write your code here | ||
| sorted_variables = { | ||
| "mutable": [marks, my_favourite_films, name, one_is_a_prime_number, pi, lucky_number], |
There was a problem hiding this comment.
According to checklist items #3–5, the "mutable" list must contain only variables of mutable types (my_favourite_films, marks, collection_of_coins), but you are also placing immutable variables (name, one_is_a_prime_number, pi, lucky_number) here and missing collection_of_coins entirely.
| # write your code here | ||
| sorted_variables = { | ||
| "mutable": [marks, my_favourite_films, name, one_is_a_prime_number, pi, lucky_number], | ||
| "immutable": [profile_info] |
There was a problem hiding this comment.
Per checklist items #3–5, the "immutable" list must contain all variables of immutable types (lucky_number, pi, one_is_a_prime_number, name, profile_info), but currently only profile_info is included.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved because it fully meets the task requirements and behaves as expected. The sorted_variables dictionary is defined with exactly the two required keys, "mutable" and "immutable", and each value is a list as specified. All eight predefined variables are present exactly once and correctly classified by mutability: lists and other mutable types are in the "mutable" list, while numbers, strings, and other immutable types are in the "immutable" list. You also fixed the previous style issue by wrapping the long line so it now respects the 79-character limit, which keeps the code consistent with flake8 guidelines. Overall, the implementation is clear, correct, and aligned with the instructions—well done on addressing the earlier issues cleanly.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.