PYTHON Report
PYTHON Report
PYTHON Report
On
CGPA Calculator
in
COMPUTER SCIENCE AND ENGINEERING
By
Irfan Ali
2020-Cuvas-0228
For university students keeping track of their cgpa is pretty important so that
they can keep a balance between their academics and co-curricular activities
along with good marks thus its much difficult to keep on calculating again and
again the types and cgpa and hence this CGPA calculator helps to instantly
calculate the gpa and cgpa of a student based on certain inputs.
We have created a very user friendly project so that user can easily run through
it without any difficulty.
The major purpose of the project is to help students keep track of their grades
and markings. Also they can predict how much they have to score to keep the
desired cgpa for the year.
Calculation of GPA and cgpa have become much more easier through this
project the student are easily able to know the grading system.
Problem Statement
This project will describe the GPA and cgpa calculating system. The code
should start by asking the user the number of semesters he has completed, Then
the number of courses taken each semester, and based on that, the user will start
their admission. Grades in each course with the number of credits for this
course. The rating system is shown below.
Methodology
Your CGPA calculated dividing the sum of the grade points earned by the total
credit value of courses you have attempted.Useing IDE Code Block for
compiling C++ language code. Main function calling the desired output and
using in this Project object Oriented Programming concepts
Main Features
Option= 1
Calculate GPA (Grade Point Average)
Option= 2
Calculate CGPA (Cumulative Grade Point Average)
Option= 3
Exit from the user interface
Motivation
I worked on the cgpa calculation project. Developing the project was indeed a
tough task for but we enjoyed to make this project Moreover we have also
learned that hardworking important role in accomplishing any task.
Challenges
Challenge 1
The biggest challenge for me was to come up with a formula for extracting GPA
from grade points and credit hours.
Challenge 2
GPA and Cgpa creating to separate menu and was to calculate.
Challenge 3
Creating a box main menu ASCCI values.
Header files
Our project is based on these Header files.
1. #include<iostream.h>
2. #include<stdio.h>
#' is a symbol that says "next instruction is for pre-processor, not compiler".
#include <stdio.h> does absolutely nothing more than take contents of the file
named "stdio.h" and stick it inside your source file. Simple as that.
3. #include<string>
BUILDIN FUNCTION
Cin
Cout
};
class GPA: public Profile
{
public :
void calculate()
{
int q;
system("cls");
system("color 71");
printf(" %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c
%c %c %c %c %c %c %c %c %c %c %c %c %c\n",
201,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,2
05,205,205,205,205,205,205,205,205,205,205,205,187);
printf(" %c GPA Calculating %c\n",186,186);
printf(" %c %c\n",186,186);
printf(" %c How many subject's points do you want to calculate? :
%c\n",186,186);
printf(" %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c
%c %c %c %c %c %c %c %c %c %c %c %c %c\n",
202,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,2
05,205,205,205,205,205,205,205,205,205,205,205,188);
cin>>q;
cout<<endl;
for(int i=0;i<q;i++)
{
cout<<"Enter the credit for the subject "<<i+1<<": ";
cin>>credit[i];
cout<<endl;
cout<<"Enter the point of the subject "<<i+1<<": ";
cin>>point[i];
system("color 31");
cout<<"-----------------------------------\n\n"<<endl;
}
float sum=0;
float tot;
for(int j=0;j<q;j++)
{
tot=credit[j]*point[j];
sum=sum+tot;
}
float totCr=0;
for(int k=0;k<q;k++)
{
totCr=totCr+credit[k];
}
sub:
int inmenu;
cout<<"\n\n\n1. Calculate Again"<<endl;
cout<<"2. Exit This App \n\n"<<endl;
cout<<"Your Input: "<<endl;
cin>>inmenu;
switch(inmenu)
{
case 1:
calculate();
break;
case 2:
exit(EXIT_SUCCESS);
default:
cout<<"\n\nYou have Entered Wrong Input!Please Choose
Again!"<<endl;
goto sub;
}
}
};
printf(" %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c
%c %c %c %c %c %c %c %c %c %c %c %c %c\n",
201,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,2
05,205,205,205,205,205,205,205,205,205,205,205,187);
printf(" %c Calculate CGPA %c\n",186,186);
printf(" %c %c\n",186,186);
printf(" %c How many semester results do you want input? :
%c\n",186,186);
printf(" %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c
%c %c %c %c %c %c %c %c %c %c %c %c %c\n",
202,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,2
05,205,205,205,205,205,205,205,205,205,205,205,188);
cin>>l;
cout<<"\n\n"<<endl;
float semrs[l];
int i;
for(i=0;i<l;i++)
{
cout<<" Enter Semester "<<i+1<<" Result(GPA): ";
cin>>semrs[i];
cout<<"\n"<<endl;
}
float semtot=0;
for(int j=0;j<l;j++)
{
semtot=semtot+semrs[j];
}
system("color f");
cout<<"******** Your CGPA is "<<semtot/l<<" **********"<<endl;
if(semtot/l<2.5)
cout << "you have to take more then 3.0 cgpa in next semester otherwise you
will be dropped";
else
sub:
int inmenu;
cout<<"\n\n\n1. Calculate Again"<<endl;
cout<<"2. Exit This App \n\n"<<endl;
cout<<"Your Input: "<<endl;
cin>>inmenu;
switch(inmenu)
{
case 1:
calculate();
break;
case 2:
exit(EXIT_SUCCESS);
default:
cout<<"\n\nYou have Entered Wrong Input!Please Choose
Again!"<<endl;
goto sub;
}
};
int main()
{
GPA gpa;
CGPA cgpa;
system("cls");
int input;
system("color 34");
printf(" %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c
%c %c %c %c %c %c %c %c %c %c %c %c %c\n",
201,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,2
05,205,205,205,205,205,205,205,205,205,205,205,187);
printf(" %c MENU: %c\n",186,186);
printf(" %c 1. Calculate GPA (Grade Point Average)
%c\n",186,186);
printf(" %c 2. Calculate CGPA (Cummulative Grade Point Average)
%c\n",186,186);
printf(" %c 3. Exit Application %c\n",186,186);
printf(" %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c %c
%c %c %c %c %c %c %c %c %c %c %c %c %c\n",
202,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,2
05,205,205,205,205,205,205,205,205,205,205,205,188);
sub:
cout<<"Enter your choice: ";
cin>>input;
switch(input)
{
case 1:
gpa.getdata();
gpa.calculate();
break;
case 2:
cgpa.getdata();
cgpa.calculate();
break;
case 3:
exit(EXIT_SUCCESS);
break;
default:
cout<<"You have entered wrong input.Try again!\n"<<endl;
goto sub;
break;
}
}
Screenshots of gui
Save button to save data
zz
Text box as a Resets all data Calculates tgpa
communicator
RESULT
Through this project the students would be able to easily calculate their
tgpas and cgpa in a faster and easier manner and as developers we were
also able to learn the features of python programming language and also
understand the working of the graphical user interface how to use the
tkinter library to make one and the SQLite3 for the database which act as a
storage system in the backend for our project.
We were also able to come up with certain new ideas which we have
implemented in our project. By making this project we have explored the
vast field of python programming language and were able to use our
theoretical knowledge in a practical project which has helped us in
understanding the concepts far better than any bookish knowledge.
2. Bahasa C++
Websites:
https://gist.github.com/
https://google.com/
https://Academia.edu.com/