Sort the mutable / immutable values to sorted_variables#3593
Sort the mutable / immutable values to sorted_variables#3593jekul-andrew wants to merge 3 commits into
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because it fully meets the task requirements and passes all checklist items. You correctly defined all 8 variables and grouped them into the sorted_variables dictionary with exactly the two keys: "mutable" and "immutable" [CHECKLIST ITEM #1, #2, #8, #9]. The mutable group correctly includes the list, dict, and set, and the immutable group correctly includes the int, float, bool, string, and tuple, satisfying the mutability separation requirement [CHECKLIST ITEM #3, #4]. All variables appear exactly once across the two lists, and sorted_variables is clearly built from those predefined variables rather than re-creating values inline [CHECKLIST ITEM #5, #6, #7].
One minor conceptual note: as mentioned in the comment, collection_of_coins is a set, which is indeed mutable in Python, so its presence in the "mutable" list is both correct and important for understanding mutability. The only very small nit is naming consistency between variables like "michel" and "Richard", but this does not affect correctness or requirements. Overall, your implementation is clear, correct, and aligned with the task—well done.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
|
|
||
| # write your code here | ||
| sorted_variables = { | ||
| "mutable": [my_favourite_films, marks, collection_of_coins], |
There was a problem hiding this comment.
collection_of_coins is a set, which is a mutable type in Python, but the overall task only requires grouping by mutability, not by specific type. Your current grouping still satisfies the requirement to separate mutable vs immutable variables, since lists, dicts, and sets are all mutable, and the remaining variables are immutable. Just be aware conceptually that sets are mutable too, which is why including this variable under "mutable" is correct.
No description provided.