solution - #3795
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because one core requirement is not met and it blocks the tests. The task asks to classify all 8 variables into sorted_variables['mutable'] or sorted_variables['immutable'], but pi (float) is missing from the structure, causing test_variables_should_be_added_to_sorted_variables[pi] to fail.
Critical issues to fix:
- In app/main.py, ensure
piis included undersorted_variables['immutable'](floats are immutable). For example, after defining all variables, buildsorted_variablesso that it includespialongside other immutable types (int, bool, str, tuple). Double-check spelling and that you reference the actual variablepirather than a literal or a different name.
Why this matters: the tests expect every predefined variable to appear in one of the two lists; missing pi means the implementation is incomplete per the requirement and breaks functionality.
Minor tip: Construct sorted_variables after all variable declarations to avoid ordering/name issues, and keep categories clear: mutable (list, dict, set) vs immutable (int, bool, str, tuple, float).
You’ve done well classifying the others—once pi is added to the immutable list, the tests should pass. Keep it up!
✨ 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, marks, collection_of_coins], | ||
| "immutable": [lucky_number, one_is_a_prime_number, name, profile_info] |
There was a problem hiding this comment.
The pi variable (float type) is not included in either the "mutable" or "immutable" list. The task requires classifying all 8 variables, but this implementation only classifies 7. Add pi to the "immutable" list.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Here is my approval based on your implementation meeting the task requirements. You correctly categorized 8 variables into mutable (list, dict, set) and immutable (int, float, bool, str, tuple), aligning with the specification. The inclusion of pi under the immutable types is accurate, and there are no functional issues or missing features. Everything appears to run without errors and satisfies the core checklist items. As a minor improvement, you could add brief comments explaining why each type is classified as mutable or immutable to reinforce understanding, but this is optional. Nicely done and keep up the good work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.