Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
4. Question 3


Perfect! How about loops?


Write a program that finds the arithmetic mean (average value) of all the numbers provided by the user:

  • Start by asking the user: How many numbers do you have?
  • Keep asking the user to provide additional numbers by showing Provide a number:
  • Once you have all numbers, print: The average is {average_value}

Stuck? Here's a hint!

Ask the user how many numbers they're going to provide. Store this information in a variable named count_numbers. Then, create a loop like this:

for i in range(0, count_numbers):