DEV Community

Lakshmi Pritha Nadesan
Lakshmi Pritha Nadesan

Posted on

Write a program to SSLC Mark Percentage Calculator

SSLC Mark Percentage Calculator:

To calculate the total mark percentage, you can use the formula:

Percentage of marks = (Total marks earned/marks available) * 100

Here are the steps to calculate the total mark percentage:

-Add up the total points earned
-Add up the total points possible
-Divide the total points earned by the total points possible
-Multiply the result by 100 
Enter fullscreen mode Exit fullscreen mode

Example:

468/500*100=93.6

len() returns the number of characters in a text string.

print("Welcome to SSLC Marksheet")  # Display a welcome message

# Taking input marks for each subject
tamil = int(input("Tamil mark : "))        # Tamil mark input
english = int(input("English mark : "))    # English mark input
maths = int(input("Maths mark : "))        # Maths mark input
science = int(input("Science mark : "))    # Science mark input
social = int(input("Social mark : "))      # Social mark input

# Calculating the total marks
result = tamil + english + maths + science + social
print("Total Mark :", result)               # Display total marks

# Creating a list to store marks
max_mark = [tamil, english, maths, science, social]

# Calculate percentage
percent = result / (len(max_mark) * 100) * 100  # Formula for percentage
print("Percentage (%):", round(percent, 2))     # Display the percentage, rounded to 2 decimal places




Enter fullscreen mode Exit fullscreen mode

Output:

Welcome to SSLC Marksheet
Tamil mark : 98
English mark : 88
Maths mark : 98
Science mark : 88
Social mark : 96
Total Mark : 468
Percentage (%): 93.6
Enter fullscreen mode Exit fullscreen mode

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay