Skip to main content

Posts

Showing posts with the label #Write a Python program to enter marks of five subjects and calculate total

ads1

Python Basic , 15. Write a Python program to enter marks of five subjects and calculate total, average and percentage.

  15. Write a Python program to enter marks of five subjects and calculate total, average and percentage. Solution :- rno = int(input("Enter the roll number :-   ")) name = input("Enter your name :- ") s1 = int(input("Enter the marks of English :-")) s2 = int(input("Enter the marks of Hindi :-")) s3 = int(input("Enter the marks of Social :- ")) s4 = int(input("Enter the marks of Science :- ")) s5 = int(input("Enter the marks of Computer :-   ")) tot = s1 + s2 + s3 + s4 + s5 avg = tot/5 print("The rollno you Entered :- ",rno) print("The name you entered :- ",name) print("The total marks your gained :- ",tot) print("The Percentage you get :- ",avg)   Output :-

ads2