Skip to main content

A Python-based CGPA Calculator to manage courses and calculate weighted CGPA.

Project description

CGPA Calculator

Library Link: https://pypi.org/project/cgpa-calculator/1.0.0/

pip install cgpa-calculator-2

A Python-based CGPA Calculator that helps you manage your courses, calculate your CGPA based on GPAs and credits, and display detailed course-wise results. The tool is simple, efficient, and easy to use.

Features

  • Add multiple courses with GPA and credit values.
  • Calculate weighted CGPA based on the entered courses and credits.
  • Display detailed results for each course, including course name, GPA, and credit hours.
  • Input validation for GPA (0.0–4.0) and credit values (positive numbers).

Getting Started

Prerequisites

  • Python 3.x installed on your system.

Installation

  1. Clone this repository or download the CGPACalculator.py file:
    https://github.com/Mustakim-Taki/cgpa_calculator
    cd cgpa_calculator
    

Ensure Python is installed and properly configured.

Usage

  1. Add Courses Use the add_course method to add a course with:

Course Name (string) GPA (float, 0.0–4.0) Credit Hours (positive integer)
from cgpa_calculator import CGPACalculator calculator = CGPACalculator() ##calculator.add_course(course_name, gpa, credit) calculator.add_course("CSE110", 4.0, 3)
calculator.add_course("CSE370", 3.7, 3)
2. Calculate CGPA
Call the calculate_cgpa method to compute your CGPA:
calculator.calculate_cgpa() 3. Show Course Results Display all added courses with their details using the show_results method: calculator.show_results()

Example Output

Your CGPA is: 3.90
Course Results:
Course: CSE110 || Credit: 3 || GPA: 4.0
Course: CSE370 || Credit: 3 || GPA: 3.7

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cgpa_calculator-2.2.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cgpa_calculator-2.2.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file cgpa_calculator-2.2.0.tar.gz.

File metadata

  • Download URL: cgpa_calculator-2.2.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for cgpa_calculator-2.2.0.tar.gz
Algorithm Hash digest
SHA256 b0beedca69e2a010875b4011e575688b7555ac02b8ef5c069854a7a7655fde7c
MD5 b58536c9ec1d3e0b6c9e28be3c40cea7
BLAKE2b-256 d9899721ab19b09955f705dd5179143e03bfb9bf707de2b489157bbf2281c8ca

See more details on using hashes here.

File details

Details for the file cgpa_calculator-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cgpa_calculator-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbfc6cfade43c780c491fa485addd647cf8d068fb2ca091d5702a340e88a1032
MD5 96ac221f7fc439e6628039cb7c441018
BLAKE2b-256 deadcfa78311ef356d2e0727d1bbef6e95fd347de5986396b9ba08bac8813bff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page