From b8ed0ee1dcf37e1bf02238301cfa4ca8ce7f6297 Mon Sep 17 00:00:00 2001 From: kunal saini <52192993+kunal254@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:00:32 +0530 Subject: [PATCH 1/4] Update 11_functions.md --- 11_Day_Functions/11_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/11_Day_Functions/11_functions.md b/11_Day_Functions/11_functions.md index a80e5bf..d40c28a 100644 --- a/11_Day_Functions/11_functions.md +++ b/11_Day_Functions/11_functions.md @@ -365,7 +365,7 @@ print(generate_groups('Team-1','Asabeneh','Brook','David','Eyob')) ```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)) # 27 From 3e6f31e6d3aa9c4df1a6471e68da87c8166cb977 Mon Sep 17 00:00:00 2001 From: kunal saini <52192993+kunal254@users.noreply.github.com> Date: Thu, 17 Feb 2022 14:53:33 +0530 Subject: [PATCH 2/4] Update 13_list_comprehension.md --- 13_Day_List_comprehension/13_list_comprehension.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/13_Day_List_comprehension/13_list_comprehension.md b/13_Day_List_comprehension/13_list_comprehension.md index d5c392f..3071ed4 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 range(21) 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] From c6b8030495d8239c8eeaa6b5d60687118cb4a422 Mon Sep 17 00:00:00 2001 From: kunal saini <52192993+kunal254@users.noreply.github.com> Date: Fri, 18 Feb 2022 14:16:10 +0530 Subject: [PATCH 3/4] Update 15_python_type_errors.md --- 15_Day_Python_type_errors/15_python_type_errors.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 16c3e71..153201e 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. @@ -358,4 +358,4 @@ If you are good at reading the error types then you will be able to fix your bug 🎉 CONGRATULATIONS ! 🎉 -[<< Day 14](../14_Day_Higher_order_functions/14_higher_order_functions.md) | [Day 16 >>](../16_Day_Python_date_time/16_python_datetime.md) \ No newline at end of file +[<< Day 14](../14_Day_Higher_order_functions/14_higher_order_functions.md) | [Day 16 >>](../16_Day_Python_date_time/16_python_datetime.md) From f467adc76996d6570e37afb21433af90f8fe7538 Mon Sep 17 00:00:00 2001 From: kunal saini <52192993+kunal254@users.noreply.github.com> Date: Sun, 20 Feb 2022 19:10:59 +0530 Subject: [PATCH 4/4] Update 19_file_handling.md --- 19_Day_File_handling/19_file_handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/19_Day_File_handling/19_file_handling.md b/19_Day_File_handling/19_file_handling.md index de51b9b..de12a0e 100644 --- a/19_Day_File_handling/19_file_handling.md +++ b/19_Day_File_handling/19_file_handling.md @@ -166,7 +166,7 @@ with open('./files/reading_file_example.txt') as f: To write to an existing file, we must add a mode as parameter to the _open()_ function: -- "a" - append - will append to the end of the file, if the file does not it creates a new file. +- "a" - append - will append to the end of the file, if the file does not exist it creates a new file. - "w" - write - will overwrite any existing content, if the file does not exist it creates. Let us append some text to the file we have been reading: