Question: by using python Write a program that totals and averages numbers from 1 ton, where is supplied by user input to do this 1) Ask
Write a program that totals and averages numbers from 1 ton, where is supplied by user input to do this 1) Ask the user for the value of n with the prompt "Enter how many numbers you want to total and average 2) Then write a loop (for or while for that keeps a running total of the numbers from 1 ton, for example in was 5 you would total 1+2+3+4+5 so when you exit the loop the total would be 15 3) Next compute the average of the numbers 1 to n with the formula average running total 4) finally print n, the running total, and the average unlabeled and separated by spaces. In the example where n-5 you would print 5 153
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
