Skip to content

create sorted_variables dictionary#3607

Open
Geo-DevO wants to merge 3 commits into
mate-academy:masterfrom
Geo-DevO:solution
Open

create sorted_variables dictionary#3607
Geo-DevO wants to merge 3 commits into
mate-academy:masterfrom
Geo-DevO:solution

Conversation

@Geo-DevO

Copy link
Copy Markdown

Created a dictionary that is categorized by data types

@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

Your solution is approved because it fully meets the functional requirements of the task. You correctly defined 8 variables of different data types and then created the sorted_variables dictionary with exactly two keys, "mutable" and "immutable", each mapped to a list containing the appropriate variables. All mutable variables (my_favourite_films, marks, collection_of_coins) are grouped under "mutable", and all immutable variables (lucky_number, one_is_a_prime_number, pi, name, profile_info) are grouped under "immutable", covering all required variables and data types. This aligns with the checklist items such as using a dictionary named sorted_variables, using lists as values, and including all declared variables in the correct groups.

The only issues found are minor style/linting points (e.g., spacing before inline comments like on lines 22–31 and removing the trailing blank line flagged as W391). These are not functional problems but you should fix them by adding two spaces before inline comments and ensuring comments start with # , for example: x = 5 # comment. Cleaning up these small style issues will help your code pass linting tools like flake8 and keep it consistent with PEP 8. Overall, nice work implementing the required logic and structure correctly.


✨ 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

@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 all functional requirements are fully met: you defined eight variables of the correct types and grouped them properly into the sorted_variables dictionary under the two keys "mutable" and "immutable", each mapped to a list. The mutability classification is correct (lists, dicts, sets under "mutable"; numbers, bool, string, and tuple under "immutable"), and there are no issues that break functionality or violate the core task requirements. The remaining points are purely stylistic: inline comments should consistently use two spaces before the # and one space after it (for example, collection_of_coins, # Set {}, with single values), and the file should not end with an extra blank line (remove the final empty line after the closing brace of sorted_variables). These style issues are minor and can be cleaned up easily, but they don’t block the core correctness of your solution. Overall, you’ve done a solid job on the logic and structure; just keep an eye on comment formatting and trailing blank lines to satisfy common linters like flake8 in future work.


✨ 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
# create a dictionary categorized by data types
sorted_variables = {
"mutable" : [
my_favourite_films, #List[]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inline comments should follow the requested style: two spaces before # and a space after it (e.g., my_favourite_films, # List[]). Please adjust all similar inline comments here to match that format.

Comment thread app/main.py
sorted_variables = {
"mutable" : [
my_favourite_films, #List[]
marks, # Dictionary {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same inline comment spacing issue as above: add two spaces before # and ensure there is a space after #. Apply this consistently to all inline comments in this block.

Comment thread app/main.py Outdated
"mutable" : [
my_favourite_films, #List[]
marks, # Dictionary {}
collection_of_coins, # Set {} , with single values

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same inline comment spacing issue: fix to collection_of_coins, # Set {}, with single values to match the requested style.

Comment thread app/main.py
collection_of_coins, # Set {} , with single values
],
"immutable" : [
lucky_number, # Integer (int)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inline comments here also need two spaces before # and a space after it (for all commented entries in the "immutable" list).

Comment thread app/main.py Outdated
]
}


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This file ends with an extra blank line, which was previously flagged (W391). Remove the trailing blank line so the file ends immediately after the closing brace of sorted_variables.

@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 cleanly implements all the requested data types and categorizations. You correctly defined eight variables covering int, float, bool, str, list, tuple, dict, and set, and then organized them into the sorted_variables dictionary with exactly the two keys "mutable" and "immutable". Both lists under these keys contain only the appropriate types, so the mutability distinction is accurate and aligns with the checklist expectations (e.g., [CHECKLIST ITEM #3]–[CHECKLIST ITEM #7]). Your inline comments are consistently spaced and the file ends cleanly without extra blank lines, which shows good attention to style as well as functionality. Overall, your code is clear, correct, and easy to read—excellent work on this exercise and on applying prior feedback so thoroughly.


✨ 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