From 07b421454f0b2fa99db8c85c6a6ab8d39d522140 Mon Sep 17 00:00:00 2001 From: Mohit Sigchi <50646753+Sigchi98@users.noreply.github.com> Date: Sun, 28 Aug 2022 17:14:05 +0530 Subject: [PATCH] Updated 3_odd_even_numbers.py here in line 5 added max + 1 in case max is itself an odd no. so it must be added as well in the odd_number list. --- data_structures/2_Arrays/Solution/3_odd_even_numbers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ec1c4b7..80b2922 100644 --- a/data_structures/2_Arrays/Solution/3_odd_even_numbers.py +++ b/data_structures/2_Arrays/Solution/3_odd_even_numbers.py @@ -2,7 +2,7 @@ odd_numbers = [] -for i in range(1, max): +for i in range(1, max + 1): if i % 2 == 1: odd_numbers.append(i)
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: