Question: Create a new program that will ask a user to enter a number repeatedly. This program will calculate 2 averages based on whether the sum

Create a new program that will ask a user to enter a number repeatedly. This program will calculate 2
averages based on whether the sum of digits in the inputted numbers are odd or even: avg_even (average
of all inputs whose digits sum up to an even number) and avg_odd (average of all inputs whose digits sum
up to an odd number). The program will stop when the user enters a 0. For example, 2,26 and 123 are
numbers whose digits sum up to an even number (2,2+6=8 and 1+2+3=6, respectively).

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!