Log in to save your progress.
<< Back to problems
OBS! Fönstret är för smalt för att använda pythonlabbet.se. Använd en enhet med tangentbord!

Calculate the average

Prerequisites: Basic course part I

Write a program that lets the user enter a number of numbers, one by one, and calculate the average. The user finishes the input with x. Only print the average.

You do not need to handle the case that the user does not enter any numbers.

Example input 1

10
5
3
x

Example output 1

6.0

Example input 2

-1.5
7.8
x

Example output 2

3.15

Login to save your progress and your code.

Create

Write your code here.

-- Output from your program will be here --