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

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

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!