Question: Q1. Create Python program that will: 1. Input a Loop number. 2. Use the loop variable as the final range of a FOR Loop, your

 Q1. Create Python program that will: 1. Input a Loop number.

Q1. Create Python program that will: 1. Input a Loop number. 2. Use the loop variable as the final range of a FOR Loop, your range initial value is 0. 3. Then print all the numbers in the loop range that will start at number 1...so on, in horizontal display with 1 blank character space. Ex. Loop of 5 1 2 3 4 5 4. Declare an empty array for even numbers. 5. Use FOR Loop with a range of the Loop number, make sure that your range will start evaluating the given loop number at 1. Identify all the EVEN numbers in the given loop number. Use this formula to evaluate EVEN numbers: if (variable of For % 2) == 0: then display the result of all EVEN numbers. Then add all the EVEN numbers into your even numbers array name. 6. Print the result of even numbers array name. 7. Do the same thing with identifying all the ODD numbers from the given Loop number. Use not (!) operator to indicate if the number is not even numbers or the MOD is not equal to 0. Then display the result of all ODD numbers. Then add all the ODD numbers into your ODD numbers array name

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!