Example 1
Input
calculate_average(2, 4, 6)
Output
4.0
The average of 2, 4, and 6 is (2 + 4 + 6) / 3 = 12 / 3 = 4.0.
Full lesson preview
Learn to calculate the average of three given numbers using basic arithmetic operations.
Problem statement
Task
Examples
Input
calculate_average(2, 4, 6)
Output
4.0
The average of 2, 4, and 6 is (2 + 4 + 6) / 3 = 12 / 3 = 4.0.
Input format
Output format
Constraints
Samples
Input
calculate_average(1, 2, 3)
Output
2.0
The average of 1, 2, and 3 is (1 + 2 + 3) / 3 = 6 / 3 = 2.0.