CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Write a program to find average of three numbers.

Open in App
Solution

Program:
#defining three variables
a = 5
b = 6
c = 7

#calculating average using the formula, average = (sum of variables)/(number of variables)
average = (a + b + c)/3

#print the result
print("The average of",a,b,"and",c,"is",average)


OUTPUT:
The average of 5 6 and 7 is 6.0

flag
Suggest Corrections
thumbs-up
72
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Law of Radioactivity
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon