Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Should be like this example: Please, show how to write a program in Python that asks user continuously for positive integer numbers. If typed a
Should be like this example:
Please, show how to write a program in Python that asks user continuously for positive integer numbers. If typed a zero, then stop asking and finish.
Calculate two totals (one for even and other for odd numbers) and print them out.
Find, how to decide, is the number even or odd.
Use the chart below:
Type a positive integer: 1 Type a positive integer: 3 Type a positive integer: 2 Type a positive integer: 4 Type a positive integer: 6 Type a positive integer: 0 Total of even numbers is: 12, total of odd numbers is 4 s_odd=0 S_even=0 ask for a number number is 0 -number is not 0 number is even -number is odd print S_odd and s_even _even=s_even+number s_odd=s_odd+numberStep 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