Question
- Write a Python program that reads 10 integers and then finds and prints the sum of the even and odd integers. Use a while
- Write a Python program that reads 10 integers and then finds and prints the sum of the even and odd integers.
Use a while loop to calculate. Allow the user to repeat the program(use a while loop).
- Test and verify your program and it's output.
***Use only features in Ch02 'Variables, Expressions and Statements', Ch03 'Conditional Execution', Ch04 'Functions', and Ch05 'Loops and Iterations'.
***Your program output must be exactly the same as the output in the OUTPUT section, except font style.
Assignment grading policy:
If submitted program doesn't generate correct output or doesn't run, 10 or more points will be deducted.
Improper code formatting: minimum of 4 points will be deducted (excessive white space or improper indentation).
Use of features that haven't been covered: 10 or more points will be deducted.
*************************************************************************************
OUTPUT:
- The bold text is the user's input.
*************************************************************************************
Please enter 10 integers: >1 >2 >3 >4 >5 >6 >7 >8 >9 >10 Even sum: 30 Odd sum: 25 Do you wish to repeat this program? (y/n) >y Please enter 10 integers: >11 >12 >13 >14 >15 >16 >17 >18 >19 >20 Even sum: 80 Odd sum: 75 Do you wish to repeat this program? (y/n) >n Done!
*************************************************************************************
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started