Question: Write a program that generates all odd numbers from 1 to n. set n in the beginning of the program and use a while loop

Write a program that generates all odd numbers from 1 to n. set n in the beginning of the program and use a while loop to compute the numbers. Name the program file: odd.py.
Assignment . Write a program that generates all odd numbers from 1 to n. Set n in the beginning of the program and use a while loop to compute the numbers. (Make sure that if n is an even number, the largest generated odd number is n-1.) Name of program file: odd.py
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
