Write a python program to calculate the average of two numbers and find their deviation.

 

Write a python program to calculate the average of two numbers and find their deviation.

program:

num1=float(input("Enter a number1:"))
num2=float(input("Enter a number2:"))
avg=(num1+num2)/2
print("The average of a number is",avg)
print("Deviation of a number1 is",num1-avg)
print("Deviation of a number2 is",num2-avg)

OUTPUT:

No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.