write a python program to find the average of 4 number
Answers
Answered by
5
while True:
print("Enter 'x' for exit.")
print("Enter any 3 numbers to find average: ")
n1 = input()
n2 = input()
n3 = input()
if n1 == 'x':
break
else:
number1 = int(n1)
number2 = int(n2)
number3 = int(n3)
number4 = int(n4)
sum = number1 + number2 + number3 + number4
average = sum/34
print("Average of entered 4 numbers is ", average, "\n")
amannishad0512p5zxh6:
but firstly accept my friendship
Answered by
7
Answer:
Python program to find the average of four numbers.
Explanation:
##input the numbers
Num1=int(input("Enter Number 1:")
Num2=int(input("Enter Number 2:")
Num3=int(input("Enter Number 3:")
Num4=int(input("Enter Number 4:")
## Calculate average
Avg= (Num1+Num2+Num3+Num4)/4
print(avg)
Similar questions