From b465a645fb27170a086872fbe84c4229ff57bddd Mon Sep 17 00:00:00 2001 From: Heorhii Babchenko Date: Fri, 19 Jun 2026 18:26:14 +0200 Subject: [PATCH 1/3] create sorted_variables dictionary --- app/main.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index f07695b9b..3af4b5c55 100644 --- a/app/main.py +++ b/app/main.py @@ -16,4 +16,20 @@ } collection_of_coins = {1, 2, 25} -# write your code here +# create a dictionary categorized by data types +sorted_variables = { + "mutable" : [ + my_favourite_films, #List[] + marks, # Dictionary {} + collection_of_coins, # Set {} , with single values + ], + "immutable" : [ + lucky_number, # Integer (int) + one_is_a_prime_number, #Boolean value (bool) + pi, # Floating-point number (float) + name, # String (str) + profile_info, # Tuple () + ] +} + + From bb979eab53ac85e9b38c110d328c566369716465 Mon Sep 17 00:00:00 2001 From: Heorhii Babchenko Date: Fri, 19 Jun 2026 18:44:01 +0200 Subject: [PATCH 2/3] =?UTF-8?q?Fix:=20=D0=B2=D0=B8=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=BD=D1=8F=20=D0=BF=D0=BE=D0=BC=D0=B8=D0=BB?= =?UTF-8?q?=D0=BA=D0=B8=20flake8=20(=D1=82=D0=B5=D1=81=D1=82=D0=B8=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D1=82=D0=B8=D0=BB=D1=96=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BA=D1=83=20=D0=BA=D0=BE=D0=B4=D1=83=20PEP=208)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/main.py b/app/main.py index 3af4b5c55..c9dbe4392 100644 --- a/app/main.py +++ b/app/main.py @@ -19,16 +19,16 @@ # create a dictionary categorized by data types sorted_variables = { "mutable" : [ - my_favourite_films, #List[] - marks, # Dictionary {} - collection_of_coins, # Set {} , with single values + my_favourite_films, #List[] + marks, # Dictionary {} + collection_of_coins, # Set {} , with single values ], "immutable" : [ - lucky_number, # Integer (int) - one_is_a_prime_number, #Boolean value (bool) - pi, # Floating-point number (float) - name, # String (str) - profile_info, # Tuple () + lucky_number, # Integer (int) + one_is_a_prime_number, #Boolean value (bool) + pi, # Floating-point number (float) + name, # String (str) + profile_info, # Tuple () ] } From 57633a49403d425a9e0b65433dfa185acf535dff Mon Sep 17 00:00:00 2001 From: Heorhii Babchenko Date: Fri, 19 Jun 2026 19:10:28 +0200 Subject: [PATCH 3/3] Fix: fix code style and comments according to flake8 requirements --- app/main.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/main.py b/app/main.py index c9dbe4392..6ea122f5d 100644 --- a/app/main.py +++ b/app/main.py @@ -2,6 +2,7 @@ pi = 3.14 one_is_a_prime_number = False name = "Richard" + my_favourite_films = [ "The Shawshank Redemption", "The Lord of the Rings: The Return of the King", @@ -9,27 +10,28 @@ "The Good, the Bad and the Ugly", "The Matrix", ] + profile_info = ("michel", "michel@gmail.com", "12345678") + marks = { "John": 4, "Sergio": 3, } + collection_of_coins = {1, 2, 25} -# create a dictionary categorized by data types +# Create a dictionary categorized by data types sorted_variables = { - "mutable" : [ - my_favourite_films, #List[] + "mutable": [ + my_favourite_films, # List [] marks, # Dictionary {} - collection_of_coins, # Set {} , with single values + collection_of_coins, # Set {}, with single values ], - "immutable" : [ + "immutable": [ lucky_number, # Integer (int) - one_is_a_prime_number, #Boolean value (bool) + one_is_a_prime_number, # Boolean value (bool) pi, # Floating-point number (float) name, # String (str) profile_info, # Tuple () ] } - -