Skip to content

solution - #3795

Open
VladimirKolesnikov wants to merge 2 commits into
mate-academy:masterfrom
VladimirKolesnikov:develop
Open

solution#3795
VladimirKolesnikov wants to merge 2 commits into
mate-academy:masterfrom
VladimirKolesnikov:develop

Conversation

@VladimirKolesnikov

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 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 pi is included under sorted_variables['immutable'] (floats are immutable). For example, after defining all variables, build sorted_variables so that it includes pi alongside other immutable types (int, bool, str, tuple). Double-check spelling and that you reference the actual variable pi rather 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread app/main.py Outdated
Comment on lines +19 to +21
sorted_variables = {
"mutable": [my_favourite_films, marks, collection_of_coins],
"immutable": [lucky_number, one_is_a_prime_number, name, profile_info]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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

Footnotes

  1. Rate AI review example

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