Skip to content

Sort the mutable / immutable values to sorted_variables#3593

Open
jekul-andrew wants to merge 3 commits into
mate-academy:masterfrom
jekul-andrew:develop
Open

Sort the mutable / immutable values to sorted_variables#3593
jekul-andrew wants to merge 3 commits into
mate-academy:masterfrom
jekul-andrew:develop

Conversation

@jekul-andrew

Copy link
Copy Markdown

No description provided.

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

Copy link
Copy Markdown

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 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

  1. Rate AI review example

Comment thread app/main.py

# write your code here
sorted_variables = {
"mutable": [my_favourite_films, marks, collection_of_coins],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

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