Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop a Python program which inputs a series of integers and processes them. The program will: a) Continue to process values until the user enters
Develop a Python program which inputs a series of integers and processes them. The program will: a) Continue to process values until the user enters the value 0 b) Ignore all negative integers c) Count the number of odd integers entered d) Count the number of even integers entered e) Calculate the sum of the odd integers in the series f) Calculate the sum of the even integers in the series g) Display the sum of odds h) Display the sum of evens i) Display the count of odds j) Display the count of evens k) Display the total number of positive integers entered i) BONUS: print a message whenever a negative integer is entered Sample output: Input an integer (theta terminates): 1 Input an integer (theta terminates): 3 Input an integer (theta terminates): -2 Input an integer (theta terminates): 2 Input an integer (theta terminates): 6 Input an integer (theta terminates): 5 Input an integer (theta terminates): theta sum of odds: 9 sum of evens: 8 odd count: 3
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