Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with python please Write a program that reads a sequence of integer inputs and uses a while loop and and if/else statement
I need help with python please
Write a program that reads a sequence of integer inputs and uses a while loop and and if/else statement to print the number of even and odd inputs.
Ex: If the inputs are 3,6,79,12,Q it would look like this for the input: Enter an integer (Q to quit): 3 Enter an integer (Q to quit): 6 Enter an integer (Q to quit): 7 Enter an integer (Q to quit): 9 Enter an integer (Q to quit): 12 Enter an integer (Q to quit): 8 and this for the output: The user entered 2 even values and 3 odd values. Ex: If the inputs are 4,11,24,5,9,2,Q, and entire run of the program would be: Enter an integer (Q to quit): 4 Enter an integer ( Q to quit): 11 Enter an integer ( Q to quit): 2 Enter an integer (Q to quit): 24 Enter an integer (Q to quit): 5 Enter an integer (Q to quit): 9 Enter an integer (Q to quit): 2 Enter an integer (Q to quit): Q The user entered 3 even values and 3 odd valuesStep 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