Question: Python help Create a list of the odd numbers between 1 and n (include 1 as well as n -- if it's odd-- in the

Python help

Create a list of the odd numbers between 1 and n (include 1 as well as n -- if it's odd-- in the list). Associate the list with the variable odds.

this is what I have so far but it's not correct

odds = [] for numbers in range(1,n): if numbers % 2 != 0: odds.append(numbers)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!