We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
max = int(input("Enter max number: "))
odd_numbers = []
for i in range(1, max):if i % 2 == 1:odd_numbers.append(i)
print("Odd numbers: ", odd_numbers)
The loop is Executed 0(n) times we can reduce as 0(n/2)