diff --git a/11_Day_Functions/11_functions.md b/11_Day_Functions/11_functions.md index 3e413f8..cbfe621 100644 --- a/11_Day_Functions/11_functions.md +++ b/11_Day_Functions/11_functions.md @@ -403,7 +403,7 @@ Generally avoid this unless required as it makes it harder to understand what th ```py #You can pass functions around as parameters def square_number (n): - return n * n + return n ** n def do_something(f, x): return f(x) print(do_something(square_number, 3)) # 9 diff --git a/13_Day_List_comprehension/13_list_comprehension.md b/13_Day_List_comprehension/13_list_comprehension.md index 5e5810b..df44d92 100644 --- a/13_Day_List_comprehension/13_list_comprehension.md +++ b/13_Day_List_comprehension/13_list_comprehension.md @@ -92,7 +92,7 @@ numbers = [-8, -7, -3, -1, 0, 1, 3, 4, 5, 7, 6, 8, 10] positive_even_numbers = [i for i in numbers if i % 2 == 0 and i > 0] print(positive_even_numbers) # [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] -# Flattening a three dimensional array +# Flattening a two dimensional array list_of_lists = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] flattened_list = [ number for row in list_of_lists for number in row] print(flattened_list) # [1, 2, 3, 4, 5, 6, 7, 8, 9] diff --git a/15_Day_Python_type_errors/15_python_type_errors.md b/15_Day_Python_type_errors/15_python_type_errors.md index 949cc1f..93b6543 100644 --- a/15_Day_Python_type_errors/15_python_type_errors.md +++ b/15_Day_Python_type_errors/15_python_type_errors.md @@ -348,7 +348,7 @@ ZeroDivisionError: division by zero We cannot divide a number by zero. We have covered some of the python error types, if you want to check more about it check the python documentation about python error types. -If you are good at reading the error types then you will be able to fix your bugs fast and you will also become a better programmer. +If you are good at reading the error types, then you will be able to fix your bugs fast and you will also become a better programmer. 🌕 You are excelling. You made it to half way to your way to greatness. Now do some exercises for your brain and for your muscle.