Write a program to enter marks of five subjects and calculate total, average and percentage

Problem: 

Write a program to enter marks of five subjects and calculate total, average and percentage 



Code:

print('Enter the marks of  five subjects:') 

print() 

m1 = float(input("Enter marks of Mathematics ")) 

m2 = float(input("Enter marks of Aptitude ")) 

m3 = float(input("Enter marks of Java ")) 

m4 = float(input("Enter marks of Soft Skills ")) 

m5 = float(input("Enter marks of Networks ")) 

print() 

# total marks 

total = m1+m2+m3+m4+m5 

print("Total marks of five subjects", total) 


# Average marks 

average = total/5 

print("Average marks of five subjects", average) 

 # Percentage 

perc = (total/500)*100 

print("Percentage of five subjects marks", perc)

Output:



For Flipkart and Amazon best deals visit:






No comments:

Powered by Blogger.