Problem 3: Average of a List Function
Easypython
Learn the Concept: FunctionsProblem Description
Write a function calculate_average(numbers) that takes a list of numbers and returns their average.
Input
A list containing one or more numbers.
Output
A single number representing the average.
Constraints
- The list will always contain at least one number.
Example Input
text[10, 20, 30, 40]
Example Output
textAverage: 25.0
Concepts Covered
Functions, loops, lists, return, arithmetic operations.
Related Problems
- Problem 1: Simple Interest Calculator FunctionEasy · pythonSolve Problem
- Problem 2: Even or Odd Checker FunctionEasy · pythonSolve Problem
- Problem 4: Greeting Function with Default ArgumentEasy · pythonSolve Problem