From fd97ca9e7377af65b2c6e7edbbe60f287b85d047 Mon Sep 17 00:00:00 2001 From: Aravinth Date: Thu, 8 Jul 2021 19:12:09 +0530 Subject: [PATCH 1/2] range updated to get odd numbers between 1 and max number --- data_structures/2_Arrays/Solution/3_odd_even_numbers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data_structures/2_Arrays/Solution/3_odd_even_numbers.py b/data_structures/2_Arrays/Solution/3_odd_even_numbers.py index 334b53c..ec1c4b7 100644 --- a/data_structures/2_Arrays/Solution/3_odd_even_numbers.py +++ b/data_structures/2_Arrays/Solution/3_odd_even_numbers.py @@ -2,8 +2,8 @@ odd_numbers = [] -for i in range(max): - if i%2 == 1: +for i in range(1, max): + if i % 2 == 1: odd_numbers.append(i) -print("Odd numbers: ",odd_numbers) +print("Odd numbers: ", odd_numbers) From 7d353b83e3498a0c1ec58ab184045b0b94f3a68b Mon Sep 17 00:00:00 2001 From: Dhaval Patel <60363945+dhavalsays@users.noreply.github.com> Date: Sun, 13 Nov 2022 19:23:15 -0500 Subject: [PATCH 2/2] Update bubble_sort_exercise.md --- algorithms/2_BubbleSort/bubble_sort_exercise.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithms/2_BubbleSort/bubble_sort_exercise.md b/algorithms/2_BubbleSort/bubble_sort_exercise.md index 5068b08..e930890 100644 --- a/algorithms/2_BubbleSort/bubble_sort_exercise.md +++ b/algorithms/2_BubbleSort/bubble_sort_exercise.md @@ -36,5 +36,5 @@ elements = [ ] ``` -[Solution](https://github.com/codebasics/data-structures-algorithms-python/blob/master/algorithmsAlgorithms/2_BubbleSort/bubble_sort_exercise_solution.py) +[Solution](https://github.com/codebasics/data-structures-algorithms-python/blob/master/algorithms/2_BubbleSort/bubble_sort_exercise_solution.py)