Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because a core requirement isn’t met: the task expects sorted_variables to contain variable references (names) grouped by mutability, but your code stores the values instead. At lines 30–44 in app/main.py, the logic pulls from unsorted_variables and places the evaluated values into the lists, which contradicts the example requirement of sorted_variables = {"mutable": [b, d], "immutable": [a, c]} where a, b, c, d are references to the defined variables.
Critical issues to fix:
- At lines 30–44, stop collecting values from
unsorted_variables; instead, buildsorted_variableswith the actual variable references. This ensures the lists reflect the original variables and not their current values. - Ensure that
sorted_variables["mutable"]contains the mutable variables (e.g.,b,d) andsorted_variables["immutable"]contains the immutable ones (e.g.,a,c) as references, matching the task example and expected behavior.
A helpful approach: explicitly construct the lists using the variable identifiers you defined earlier, or, if dynamically determining mutability, keep track of the identifiers and append those references directly rather than their evaluated values. Your structure and intent are clear—once you switch to storing references instead of values, the solution should align with the requirements. Keep up the good work and adjust this piece to meet the core specification.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Changes are needed because the implementation does not meet a core requirement: the task expects storing variable references (names) in sorted_variables, not their evaluated values. On lines 19–27, unsorted_variables holds evaluated values (e.g., lucky_number becomes 777), which prevents building the required lists of variable identifiers. Similarly, on lines 36–41, sort_random_variables appends values to the lists, resulting in sorted_variables containing numbers, strings, and tuples rather than the variable names like b, d, a, c shown in the example.
To fix this, do not rely on unsorted_variables values. Instead, construct sorted_variables directly using the variable identifiers: for example, put mutable identifiers like my_favourite_films, marks, collection_of_coins under "mutable", and immutable identifiers like lucky_number, pi, one_is_a_prime_number, name, profile_info under "immutable". If a function is required, ensure it aggregates the variable identifiers themselves rather than their values. Once updated, the output should match the requirement of listing variable references, not their evaluated contents.
Good job organizing your variables and creating a sorting function; with the above adjustments, your solution will align with the task requirements.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved. You correctly grouped variable identifiers by mutability, placing names like my_favourite_films, marks, and collection_of_coins under mutable, and lucky_number, pi, one_is_a_prime_number, name, and profile_info under immutable. This matches the requirement to store variable names (not evaluated values) in the sorted_variables structure, and the overall output format is correct.
- What you did well: clear separation of mutable vs. immutable categories and accurate use of variable identifiers in the dictionary.
- Minor suggestion: ensure consistent naming conventions and comments to make the intent of each variable clear for future readers.
Great job—your organization and adherence to the requirements make this a solid submission.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.