22. Python Program to Read the marks of three subjects and display the Total, Average and Class.
How does this program work?
- In this program you are going to learn about how to find the Total, Average and Class for three subjects marks using Python.
- In this program three subject marks will stored in three different variables.
- After that we can find out the Total, Average and Class.
Here is the code
a = int(input("Enter the marks of first subject: "))
b = int(input("Enter the marks of second subject: "))
c = int(input("Enter the marks of third subject: "))
total = a+b+c
avg = total/3
print("Total marks: ",total)
print("Average marks: ",avg)