Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

MY PROGRAMMES

Thursday, April 6, 2023

MEAN COST OF ARTICLES

a1=input("Enter the name of first article = ")
c1=int(input("Enter the cost of first article = "))
a2=input("Enter the name of second article = ")
c2=int(input("Enter the cost of second article = "))
a3=input("Enter the name of third article = ")
c3=int(input("Enter the cost of third article = "))
a4=input("Enter the name of fourth article = ")
c4=int(input("Enter the cost of fourth article = "))
a5=input("Enter the name of fifth article = ")
c5=int(input("Enter the cost of fifth article = "))
m=(c1+c2+c3+c4+c5)/5
print("-----------------------")
print("|Name ofArticle| Cost |")
print("|        ",a1,"       |",c1," |")
print("|        ",a2,"       |",c2," |")
print("|        ",a3,"       |",c3," |")
print("|         ",a4,"      |",c4," |")
print("|         ",a5,"      |",c5," |")
print("-----------------------")
print("Mean costs of article =",m)