60.6k views
2 votes
Write a loop that repeats seven ×, asking the user to enter a number. The loop should also calculate and display the sum and the average of the numbers entered by the user.

a. True
b. False

1 Answer

3 votes

Final answer:

The loop should repeat seven times, ask the user for a number, calculate the sum and average, and display them. The correct answer is 'True'.

Step-by-step explanation:

The given question is asking about writing a loop that repeats seven times, asking the user to enter a number, and calculating and displaying the sum and average of the numbers entered by the user.

The correct answer is 'True'. To achieve this, we can use a for loop that iterates seven times, asking the user to enter a number each time and adding it to a running sum. Finally, we can calculate the average by dividing the sum by seven and display both the sum and average to the user.

User JimN
by
7.8k points

No related questions found