1 change the code to average 20 integers as opposed to 10


Learning Exercises for you to complete

1. Change the code to average 20 integers as opposed to 10. Support your experimentation with screen captures of executing the new code.

2. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the code you created after step 1.

3. What happens if you entered a value other than an integer? (For example a float or even a string). Support your experimentation with screen captures of executing the code.

4. Modify the code to allow the user to enter an unspecified number of positive integers and calculate the average. In other words, the user could enter number of positive integers. (Hint:You can prompt the user for how many they want to enter. Or; you could use a sentinel value to trigger when the user has completed entering values). You may need to conduct some research on your own to solve this problem. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the code you created. Support your experimentation with screen captures of executing the new code.

Solution Preview :

Prepared by a verified Expert
Macroeconomics: 1 change the code to average 20 integers as opposed to 10
Reference No:- TGS01469845

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)