Toggle navigation
Mr. Code's Wild Ride
Mr. Code
Curriculum
Showcase
Python
Math
Games
Typing
Sign in
Average Calculator
Advanced Topics
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 5:
If the number is empty, calculate the mean of the list of numbers as long as there is at least one number in the list.
Hint:
Use
len()
to get the number of elements in a list, and
sum()
to find the sum of a list:
numbers = [3, 3, 4, 5] len(numbers) # returns 4 sum(numbers) # returns 15
Last step
Next step
×
Sign in