The marks obtained by a student in 5 different subjects are input through the keyboard. The student gets a division as per the following rules: Write a program to calculate the division obtained by the student.
This program is a simple Python program that calculates the total marks and percentage of a student in 5 subjects.
In summary, the program uses input function, arithmetic operator, if-else statement and comparison operator to calculate and determine the student's division based on the marks scored in 5 subjects.
m1=int(input("Enter the Mark Subject 1 :")) m2=int(input("Enter the Mark Subject 2 :")) m3=int(input("Enter the Mark Subject 3 :")) m4=int(input("Enter the Mark Subject 4 :")) m5=int(input("Enter the Mark Subject 5 :")) total=m1+m2+m3+m4+m5 per=total/5 print("Total :",total) print("Percentage :",per) if(per>=60): print("First Division..") elif(per>=50 and per<=59): print("Second Division..") elif(per>=40 and per<=49): print("Third Division..") else: print("Fail..")
Enter the Mark Subject 1 :91 Enter the Mark Subject 2 :56 Enter the Mark Subject 3 :88 Enter the Mark Subject 4 :89 Enter the Mark Subject 5 :97 Total : 421 Percentage : 84.2 First Division..
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions