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
6 changes: 5 additions & 1 deletion data_structures/2_Arrays/Solution/3_odd_even_numbers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
max = int(input("Enter max number: "))

odd_numbers = []

#if number will be odd in that case it will omit the last number for that
if max % 2 == 0:
max = max
else:
max += 1
for i in range(1, max):
if i % 2 == 1:
odd_numbers.append(i)
Expand Down