Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #1141

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Solution #1141

wants to merge 16 commits into from

Conversation

mldchik
Copy link

@mldchik mldchik commented Dec 24, 2023

No description provided.

app/main.py Outdated
Comment on lines 21 to 32
q1 = {"lucky_number": lucky_number, "lucky_number": lucky_number,
"one_is_a_prime_number": one_is_a_prime_number,
"name": name, "my_favourite_films": my_favourite_films,
"profile_info": profile_info, "marks": marks,
"collection_of_coins": collection_of_coins,
"sorted_variables": sorted_variables}

for i in q1:
if type(q1[i]) == int or type(q1[i]) == str or type(q1[i]) == bool or type(q1[i]) == float or type(q1[i]) == tuple:
sorted_variables["immutable"].append(i)
else:
sorted_variables["mutable"].append(i)

Choose a reason for hiding this comment

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

You can explicitly create dictionary with defined keys and values. for loop is unnecessary for this specific task.

app/main.py Outdated
@@ -1,5 +1,5 @@
lucky_number = 777
pi = 3.14
lucky_number = 3.14

Choose a reason for hiding this comment

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

Why did you rename this variable?

@mldchik mldchik requested a review from EdAlekseiev January 1, 2024 19:30
app/main.py Outdated
Comment on lines 18 to 26
a_ = my_favourite_films
b_ = marks
c_ = collection_of_coins
d_ = lucky_number
e_ = one_is_a_prime_number
r_ = pi
t_ = name
y_ = profile_info
sorted_variables = {"mutable": [a_, b_, c_], "immutable": [d_, e_, r_, t_, y_]}

Choose a reason for hiding this comment

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

Suggested change
a_ = my_favourite_films
b_ = marks
c_ = collection_of_coins
d_ = lucky_number
e_ = one_is_a_prime_number
r_ = pi
t_ = name
y_ = profile_info
sorted_variables = {"mutable": [a_, b_, c_], "immutable": [d_, e_, r_, t_, y_]}
sorted_variables = {
"mutable": [my_favourite_films, marks, collection_of_coins],
"immutable": [lucky_number, pi, one_is_a_prime_number, name, profile_info]
}

Choose a reason for hiding this comment

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

Still not fixed

@mldchik mldchik requested a review from EdAlekseiev January 2, 2024 14:56
Copy link

@NikOneZ1 NikOneZ1 left a comment

Choose a reason for hiding this comment

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

Implement changes requested by the previous mentor

@mldchik mldchik requested a review from NikOneZ1 January 2, 2024 16:12
app/main.py Outdated
Comment on lines 18 to 26
a_ = my_favourite_films
b_ = marks
c_ = collection_of_coins
d_ = lucky_number
e_ = one_is_a_prime_number
r_ = pi
t_ = name
y_ = profile_info
sorted_variables = {"mutable": [a_, b_, c_], "immutable": [d_, e_, r_, t_, y_]}

Choose a reason for hiding this comment

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

Still not fixed

@mldchik mldchik requested a review from EdAlekseiev January 2, 2024 19:09
Copy link

@EdAlekseiev EdAlekseiev left a comment

Choose a reason for hiding this comment

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

Good job

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.

3 participants