Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update 3_odd_even_numbers.py
I added another logic for odd numbers in the form of comments I hope I will be helpful to learners!
  • Loading branch information
NADIRHUSSAIN11 authored Oct 15, 2022
commit 4ffa62c99c83644159ec077cdd007ecb7e59917d
2 changes: 1 addition & 1 deletion data_structures/2_Arrays/Solution/3_odd_even_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
odd_numbers = []

for i in range(1, max):
if i % 2 == 1:
if i % 2 == 1: # or i % 2 != 0:
odd_numbers.append(i)

print("Odd numbers: ", odd_numbers)