[go: up one dir, main page]

Latest 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

PROJECT REPORT

ON
SUBJECT COMBINATION FOR GRADE XI

SESSION : 2024-2025

Submitted To : Submitted By :
Mrs. Geetanjali Chhabra Manas Kukreti
PGT Com. Sc. Class XII
CERTIFICATE
This is to certify that Manas Kukreti of class XII has completed his Computer
Science Project titled ‘SUBJECT COMBINATION FOR GRADE XI’ under
the guidance of Mrs. Geetanjali Chhabra for the Academic Year 2024-2025.
The certified student has been dedicated throughout the project and completed
his work before the given deadline without missing any important details from
the project.

I certify that the project is up to my expectations and can be submitted for


evaluation.

Teacher’s signature: Principal’s signature: External Examiner’s Signature:


Mrs. Geetanjali Chhabra Ms.Diana Luji Mr. Himanshu Nautiyal
ACKNOWLEDGEMENT

I undertook this project work, as part of my XII-computer science course. We have


tried to apply our best knowledge and experience, gained during the study and
classwork experience. However, developing a software system is generally a quite
complex and time consuming process . It requires a systematic study, inside vision
and professional approach during the design and development . Moreover, the
developer always feels the need , the help and good wishes of the people near you,
who have considerable experience and ideas .

I would like to extend my sincere gratitude to my teacher Mrs. Geetanjali Chhabra. I


am very much thankful to our principal for giving valuable time and moral support
to develop this software.

I would like to take the opportunity to extend my sincere thanks and gratitude to my
parents for being a source of inspiration and providing time and moral support to
develop this software.

I also feel indebted to my friends for the valuable suggestions during the project
work.

Manas Kukreti
CONTENT

1. INTRODUCTION
2. ABOUT PYTHON
3. ABOUT MY SQL
4. PROJECT DESCRIPTION
5. SYSTEM IMPLEMENTATION
6. DATABASE TABLES
6. SOURCE CODE
7. OUTPUT SCREENSHOTS
8. FUTURE PROSPECT OF PROJECT
10. CONCLUSION
11. BIBLIOGRAPHY
INTRODUCTION

Implementing an effective data management system in a learning institution is one


way of improving data access and quality. Learning institutions can enjoy seamless
and remote operations if these types of digitalisation and technologies are in place.
With a reliable data management system, the school administrator can modify the
school , keeping the school staff, parents, and students updated on the activities and
events which a school has. It records all information on student library details, exam
records, and other personal data like class status and demographic data. This kind of
data management system provides essential insights that teachers and school
management can use to monitor student performance. It also plays a significant role
in the decision-making process.

Students had to make certain decisions in their school time. Decisions which will
reflect and shape their future. One such time occurs when you select your academic
and other additional subjects according to your interest, future perspective and the
field in which you want to pursue your career. Schools and institutions must
acknowledge these decisions and give them a good space for maintaining school
profile. Therefore, here we are with a Python-MySql Interface Program, through
which students can select their subject combination on the basis of their interest and
other reference. More to that this selected data would be directly stored in the
School’s Administrative Profile Database where you can access and modify it.
ABOUT PYTHON

Introduction

Python is a high-level, interpreted, and general-purpose programming language


created by Guido van Rossum and first released in 1991. Known for its simplicity
and readability, Python is one of the most widely used programming languages
today. Its design philosophy emphasizes code readability with the use of significant
indentation, which allows programmers to express their ideas in fewer lines of code
compared to other programming languages like C++ or Java.

The python 2 language, i.e. python 2.7.x, is “sun setting” on january 1,2020,and the
python team of volunteers will not fix security issues, or improve it in other ways
after that date. With the end-of-life,only python 3.6.x and later, e.g. python 3.8
which should be released in october 2019(currently in beta), will be supported.

Python interpreters are available for many operating systems. A global community
of programmers develops and maintains python, an open source reference
implementation. A non-profit organisation, the python software
foundation,managers and directs resources for python and python development.

Python is a widely used general-purpose,high level programming language. It was


initially designed by Guido Van Rossum in 1991 and developed by python software
foundation. It Was mainly developed for emphasis on code readability, and its
syntax allows programmers to express concepts in fewer lines of code.

Why is Python Popular?

Python’s popularity stems from its ease of use, community support, and flexibility.
It is the first choice for beginners due to its human-readable syntax and extensive
documentation. Professionals appreciate its vast ecosystem and the ability to
integrate with other languages and technologies. According to the TIOBE Index,
Python often ranks as one of the top programming languages globally.
Features of Python

Python is favored for its wide range of features, which include:

1. Easy to Learn and Use: Python has a simple syntax resembling natural language,
making it accessible to beginners.

2. Interpreted Language: Python code is executed line by line, which makes


debugging easier.

3. Platform Independence: Python programs can run on different platforms


(Windows, MacOS, Linux) without modification.

4. Extensive Libraries: Python comes with a rich standard library that supports tasks
like web development, data analysis, machine learning, and more.

5. Dynamic Typing: Unlike statically typed languages, Python does not require
declaring variable types.

6. Open Source: Python is free and supported by a vibrant community of


developers.

Applications of Python

Python is incredibly versatile and finds applications in various fields, including:

1. Web Development: Frameworks like Django and Flask are used for building
robust web applications.

2. Data Science and Analytics: Python libraries like NumPy, Pandas, and Matplotlib
are widely used for data manipulation and visualization.

3. Machine Learning and Artificial Intelligence: Tools like TensorFlow, PyTorch,


and scikit-learn make Python the language of choice for AI.

4. Game Development: Libraries such as Pygame simplify the creation of games.

5. Automation and Scripting: Python is used to automate repetitive tasks like file
handling and web scraping (using Beautiful Soup or Selenium).

6. Embedded Systems: Microcontrollers like Raspberry Pi utilize Python for


prototyping and development.
Advantages and Limitations

Advantages:

1. High productivity due to concise and clean syntax.

2. Extensive libraries save development time.

3. Strong community support ensures quick problem resolution.

Limitations:

1. Slower execution compared to compiled languages like C++.

2. Not ideal for memory-intensive tasks.

3. Limited for mobile app development.

Conclusion

Python has revolutionized the way programming is approached, offering solutions

to problems across various domains. Its simplicity, versatility, and robust ecosystem

make it a valuable tool for both beginners and experienced developers. As

technology advances, Python continues to grow in relevance, powering everything

from websites to artificial intelligence.


ABOUT MYSQL

MySQL, the most popular open source SQL database management system, is developed
and distributed, and supported by MySQL AB.MySQL AB is a commercial
company founded by the MySQL developers. It is a second generation open source
company that unites open source values and methodology with a successful business model.

1. MySQL is a database management system.


2. A database is a structured collection of data. It may be anything from a simple shopping list
to a picture gallery or the vast amounts of information in a corporate network .To add, access
and process data stored in a computer database, you need a database management system
such as MySQLserver. Since computers are very good at handling large amounts of data
database management systems play a central role in computing, as standalone utilities, or
as part of other applications.
3. MySQL is a relational database management system.
4. A relational database stores data in separate tables rather than putting all the data in one
big storeroom.This adds speed and flexibility.The SQL part of “MySQL”stands for
“structured query language”.SQL is the most common standardised language used to
access databases and is defined by the ANSI/ISO SQL standard has been evolving since
1986 and several versions exist.In this manual, ”SQL-92”refers to the standard
released in1992,”SQL:1999” refers to the standard released in1999, and “SQL:2003”refers
to the current version of the standard.We use the phrase”the SQL standard”to mean the
current version of the SQL standard at any time.
5. MySQL software is open source.
A.Open source means that it is possible for anyone to use and modify the software. Anybody
can download the MySQL software from the internet and use it without paying anything. If
you wish, you may study the source code and change it to suit your needs. The MySQL
software uses the GPL(GNU General Public Licence), to define what you may and may not
do with the software in different situations. If you feel uncomfortable with the GPL or need to
embed MySQL code into a commercial application, you can buy a licensed version from us.
The MySQL database server is very fast , reliable, and easy to use.
B. If that is what you are looking for ,you should give it a try. MySQL server also has a
practical set of features developed in close cooperation with our users. You can find a
performance comparison of MySQL server with other database managers on our benchmark
page.
6. MySQL server was originally developed to handle large databases much faster than
existing solutions and has been successfully used in highly demanding
production environments for several years. Although under constant development ,
MySQL server today offers a rich and useful set of functions. Its connectivity, speed
and security makes MySQL server highly suited for accessing databases on the internet.
7. MySQL server works in client/server or embedded system. The MySQL database software
is a client/server system that consists of a multi-threaded SQL server that supports
different back-ends, several different client programs and libraries, administrative tools,
and a wide range of application programming interfaces(APIs).
8. We also provide MySQL server as an embedded multithreaded library that you can link
into your application to get a smaller, faster, easier-to-manage standalone product.
9. A large amount of contributed MySQL software is available.
10. It is very likely that your favourite application or language supports the MySQL
database server.
11. The official way to pronounceMySQL” is “My Ess Que Ell” (not”my sequel”), but we
don't mind if you pronounce it as “my sequel” or in some other localised way
12. The following list describes some of the important characteristics of the MySQL
databases software, for more information about current and upcoming features.
A. Internals and portability.
B. Written in python and SQL.
C. Tested with a broad range of different compilers.
D. Works on many different platforms.
PROJECT DESCRIPTION

PURPOSE OF THE PROJECT :


The main purpose of the Project is that students would be able to select their subjects in a
more systematic and secure way. The selection process will be stepwise. Therefore, it will be
more understandable , diverse ( Options\Choices ) but precise and clear.

EXECUTION OF THE PROJECT :


This SUBJECT COMBINATION project contains the details of the student who has selected
his Subject Combination. The individual can perform the operations that a Data Storage
Program does while here the data is particularly about his subject combination.

The Subject Combination project is written in Python. The project file contains a python
script (SubjectCombination..py). This is a simple python based program which is very easy to
use. Talking about the program, it contains limited functions which include Adding, Viewing
and Updating your Subject Combinations.

If the user is a NewStudent and wants to select subjects for the first time, then he should cope
with the first interface of the program. He must follow the following steps :
1. Enter gmail id for identification. It should be of (gmail.com) format.
2. Select the Field. There are 3 specific Streams : SCIENCE, COMMERCE and
HUMANITIES.
3. Select subjects according to your choice. Some subjects may automatically become
compulsory according to the chosen field.
4. A final selected combination could be seen.

If the user is an OldStudent and wants to view his chosen list of subject combinations, then he
should cope with the second interface of the program. He must follow the following steps :
1. Enter your registered gmail id.
2. Through the view combination interface you can access your selected combination.

If the user is an OldStudent and wants to modify or update his chosen list of subject
combinations, then he should cope with the third interface of the program. He must follow
follow the following steps :
1. Enter your registered gmail id.
2. If you want to change your STREAM, enter the stream changing interface and then
conduct the further steps.
3. If you do not want to change your stream, just want to modify the additional subjects,
enter the second interface and follow the further steps.
Your chosen subject combination will directly store in the database (SQL2). The database
contain following information about the student :
1. Name of the Student as STUDENT_NAME
2. Email id of the Student as EMAIL_ID
3. 5 chosen subjects as SUB 1 , SUB2 , SUB3 , SUB4 , SUB5
4. Selected Stream as STREAM
Email id is set as the primary key as all the students have their particular and unique id. Thus
to do any particular task the user has to first enter his Email id.

STATEMENTS , FUNCTIONS AND MODULES :


The program is mostly done through if elif and else statements. If-Else statements in Python
are part of conditional statements, which decide the control of code.
The if statement is the most simple decision-making statement. It is used to decide whether a
certain statement or block of statements will be executed or not.
Python If-Else Statement
The if statement alone tells us that if a condition is true it will execute a block of statements
and if the condition is false it won’t. But if we want to do something else if the condition is
false, we can use the else statement with the if statement to execute a block of code when the
if condition is false.
Python if-elif-else Ladder
Here, a user can decide among multiple options. The if statements are executed from the top
down.
As soon as one of the conditions controlling the if is true, the statement associated with that if
is executed, and the rest of the ladder is bypassed. If none of the conditions is true, then the
final “else” statement will be executed.
There are certain areas where the student has to choose one from the two options to proceed
further. For these situations functioning If-else statements are used.
For example - Whether the student wants Maths as a Subject or not .
There are certain times when Student has to choose one from multiple options. During this
time the if-elif-else ladder is put into the program. For example - For SUB4 students have to
choose one from Psychology , Art , Music , Dance and Physical Education.
For loop and While
For loop and while are used during times of iteration.

Functions Created are -


1. subjects( ) - Used to select the Stream
2. maths ( ) - Give choice whether students want Maths as a subject or not.
3. sub5( ) - Used to select the 5th subject if a student has chosen Maths as a subject for
Commerce and Science streams.
4.sub4s( ) - Used to select 4th subject if the student had not chosen maths as subject for
Science stream.
5. sub4c( ) - Used to select 4th subject if a student had not chosen Maths as a subject for the
Commerce field.
6. hum( ) - Used to select 4th subject for Humanities stream.
7. hum2( ) - Used to select 5th subject for Humanities stream.

There are no modules used.


Just mysql.connector has been for establishing connections between Python and Database.
DATABASE TABLES

Table Name - SCIENCE_STREAM

The above database shows the sets of combination possible in the Science Stream

Table Name - COMMERCE_STREAM

The above database shows the sets of combination possible in the Commerce Stream

Table Name - HUMANITIES_STREAM

The above database shows the sets of combination possible in the Humanities Stream
SYSTEM IMPLEMENTATION

Recommended system Implementation


Processors Intel@ Core"i3 processor 4300M at 2.60 GHZ
Disk space: 2to GB.
Operating system _Windows0 10, MACOS, and UBUNTU
Python Version : 3.X.X or Higher

Minimum System Implementation


Processors Intel Atom@ processor or Intelo Core' "13 processor
Disk space:1GB
Operating system : Windows 7 or later, MACOS , and UBUNTU
Python Versions: 2.7.X, 3.6.X

Prerequisites before installing MySQL Connector Python


You need root or administrator privileges to perform the
installation process
Python must be installed on your machine
Note: MySQL Connector Python requires python to be in the
system's PATH. Installation fails if it does not find Python
On Windows , if Python does not exist in the system's PATH
please manually add the directory containing python.exe yourself
SOURCE CODE

import mysql.connector as s
conn=s.connect(host="localhost",user="root",database="SCHOOL_SUBJECTS",pa
sswd="1234")
if conn.is_connected()==True:
print("Connection Established !")
cur=conn.cursor()

print('CONGRATULATIONS FOR COMING IN CLASS 11, LET US HELP


SELECT A SUBJECT COMBINATION FOR YOU ! ')

c=int(input('''Press 1 if you are NewStudent and selecting combinations for the first
time.
Press 2 if you are OldStudent and want to VIEW your COMBINATIONS
Press 3 if you are OldStudent and want to CHANGE your STREAM
Press 4 if you are OldStudent and want to CHANGE your PARTICULAR
SUBJECTS : '''))

if c==1:
a=str(input("Enter NAME of the Student: "))
while True:
b=str(input("Enter VALID Email (PLEASE ENTER @gmail.com DOMAIN
!) : "))
if b.endswith('@gmail.com'):
break
else:
print('ENTER VALID EMAIL with @gmail.com DOMAIN !!! : ')

SUB1='ENGLISH'
SUB2=''
SUB3=''
SUB4=''
SUB5=''

def subjects():
global subject
subject= str(input('''THERE ARE THREE STREAMS PRESENT
SCIENCE
COMMERCE
HUMANITIES !
SELECT ONE FROM THESE IN CAPITAL LETTERS : '''))
if (subject not in ('COMMERCE','HUMANITIES','SCIENCE')):
print('Enter the valid Stream in CAPITALS !!!')
else:
global value
value = SUBJECT(subject)
if (value==0):
print('You have chosen COMMERCE as your Stream: BST and
ACCOUNTS ARE COMPULSORY !')
SUB2='BST'
SUB3='ACCOUNTS'
return SUB2,SUB3
elif (value==1):
print('You have chosen HUMANITIES as your Stream:
HISTORY and GEOGRAPHY ARE COMPULSORY !')
SUB2='HISTORY'
SUB3='GEOGRAPHY'
return SUB2,SUB3
else:
print('You have chosen SCIENCE as your Stream: PHYSICS
and CHEMISTRY ARE COMPULSORY !')
SUB2='PHYSICS'
SUB3='CHEMISTRY'
return SUB2,SUB3

def SUBJECT(Stream):
if (Stream=='COMMERCE'):
return 0
elif (Stream=='HUMANITIES'):
return 1
else:
return 2
def maths():
if (value == 0 or 2):
global Maths
Maths = str(input(' Do you want Maths as a Subject : Press Y if Yes
and N if No : ' ))
if Maths == 'Y':
SUB4='MATHS'
return SUB4
else:
print('You do not want MATHS as a subject. You can further
select a subject from the list')
else:
pass

def sub5():
if value == 0 and Maths == 'Y':
print('Commerce, Select one from ECONOMICS and COMPUTER
SCIENCE')
csub5=int(input('PRESS 1 for ECONOMICS and PRESS 2 for
COMPUTER SCIENCE : '))
if csub5 == 1:
SUB5='ECONOMICS'
return SUB5
else:
SUB5='COMPUTER SCIENCE'
return SUB5
elif value == 2 and Maths == 'Y':
print('Science, Select one from BIO and COMPUTER SCIENCE')
ssub5=int(input('PRESS 1 for BIOLOGY and PRESS 2 for
COMPUTER SCIENCE : '))
if ssub5 == 1:
SUB5='BIOLOGY'
return SUB5
else:
SUB5='COMPUTER SCIENCE'
return SUB5
elif value == 0 and Maths == 'N':
print('Commerce NO Maths, Select one from ENTREPRENEURSHIP,
PHYSICAL EDUCATION, MUSIC, DANCE, ART')
csub4=int(input('''Press 1 for ENTREPRENEURSHP
PRESS 2 for PHYSICAL EDUCATION
PRESS 3 for MUSIC
PRESS 4 for DANCE
PRESS 5 for ART : '''))
if csub4 == 1:
SUB4='ENTREPRENEURSHP'
return SUB4
elif csub4 == 2:
SUB4='PHYSICAL EDUCATION'
return SUB4
elif csub4 == 3:
SUB4='MUSIC'
return SUB4
elif csub4 == 4:
SUB4='DANCE'
return SUB4
else:
SUB4='ART'
return SUB4
else:
print('Science NO Maths, Select one from PSYCHOLOGY, MUSIC,
DANCE, ART, PHYSICAL EDUCATION')
csub4=int(input('''Press 1 for PSYCHOLOGY
PRESS 2 for MUSIC
PRESS 3 for DANCE
PRESS 4 for ART
PRESS 5 for PHYSICAL EDUCATION : '''))
if csub4 == 1:
SUB4='PSYCHOLOGY'
return SUB4
elif csub4 == 2:
SUB4='MUSIC'
return SUB4
elif csub4 == 3:
SUB4='DANCE'
return SUB4
elif csub4 == 4:
SUB4='ART'
return SUB4
else:
SUB4='PHYSICAL EDUCATION'
return SUB4
def hum():
if value == 1:
print('Humanities , Select one from PSYCHOLOGY, MUSIC, DANCE,
ART, PHYSICAL EDUCATION')
hsub3=int(input('''Press 1 for PSYCHOLOGY
PRESS 2 for MUSIC
PRESS 3 for DANCE
PRESS 4 for ART
PRESS 5 for PHYSICAL EDUCATION : '''))
if hsub3 == 1:
SUB4='PSYCHOLOGY'
return SUB4
elif hsub3 == 2:
SUB4='MUSIC'
return SUB4
elif hsub3 == 3:
SUB4='DANCE'
return SUB4
elif hsub3 == 4:
SUB4='ART'
return SUB4
else:
SUB4='PHYSICAL EDUCATION'
return SUB4
def sub5s():
if (value==2 and Maths=='N'):
print('You have not taken Maths so BIOLOGY is Compulsory ! ')
SUB5='BIOLOGY'
return SUB5
def sub5c():
if (value==0 and Maths=='N'):
print('You have not taken Maths so ECONOMICS is Compulsory ! ')
SUB5='ECONOMICS'
return SUB5

def hum2():
if value == 1:
print('Humanities, Select one from ECONOMICS and CIVICS ')
hsub5=int(input('PRESS 1 for ECONOMICS and PRESS 2 for CIVICS :
'))
if hsub5 == 1:
SUB5='ECONOMICS'
return SUB5
else:
SUB5='CIVICS'
return SUB5

A=subjects()
if value==0 or value==2:
B=maths()
D=sub5()
F=sub5s()
G=sub5c()
else:
E=hum()
H=hum2()

if value==2:
if Maths == 'Y':
h=[SUB1,A[0],A[1],B,D]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("INSERT INTO SUBJECT_COMB
(EMAIL,STUDENT_NAME,SUB1,SUB2,SUB3,SUB4,SUB5,STREAM)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s')"%(b,a,SUB1,A[0],A[1],B,D,subject
,))
conn.commit()
elif Maths=='N':
h=[SUB1,A[0],A[1],D,F]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("INSERT INTO SUBJECT_COMB
(EMAIL,STUDENT_NAME,SUB1,SUB2,SUB3,SUB4,SUB5,STREAM)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s')"%(b,a,SUB1,A[0],A[1],D,F,subject,
))
conn.commit()

elif value==0:
if Maths=='Y':
h=[SUB1,A[0],A[1],B,D]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("INSERT INTO SUBJECT_COMB
(EMAIL,STUDENT_NAME,SUB1,SUB2,SUB3,SUB4,SUB5,STREAM)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s')"%(b,a,SUB1,A[0],A[1],B,D,subject
,))
conn.commit()
elif Maths=='N':
h=[SUB1,A[0],A[1],D,G]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("INSERT INTO SUBJECT_COMB
(EMAIL,STUDENT_NAME,SUB1,SUB2,SUB3,SUB4,SUB5,STREAM)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s')"%(b,a,SUB1,A[0],A[1],D,G,subject
,))
conn.commit()
elif value==1:
h=[SUB1,A[0],A[1],E,H]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("INSERT INTO SUBJECT_COMB
(EMAIL,STUDENT_NAME,SUB1,SUB2,SUB3,SUB4,SUB5,STREAM)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s')"%(b,a,SUB1,A[0],A[1],E,H,subject,
))
conn.commit()

elif c==2:
w=input('Enter your Registered Email ID : ')
m=cur.execute('SELECT STUDENT_NAME FROM SUBJECT_COMB
WHERE EMAIL="%s"'%(w,))
f=cur.fetchone()
n=cur.execute('SELECT SUB1,SUB2,SUB3,SUB4,SUB5 FROM
SUBJECT_COMB WHERE EMAIL="%s"'%(w,))
g=cur.fetchall()
print('YOU ARE')
for k in f:
print(k)
print('YOUR SELECTED COMBINATION IS : ')
for i in g:
for j in i:
print(j)
elif c==3:
w=input('Enter your Registered Email ID : ')
print('AS YOU WANT TO SELECT A NEW STREAM !')
print('A NEW SET OF SUBJECTS WILL ALSO NEED TO BE SELECTED
ACC TO STREAM !')
SUB1='ENGLISH'
SUB2=''
SUB3=''
SUB4=''
SUB5=print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("UPDATE SUBJECT_COMB SET SUB1='%s' where
EMAIL='%s'"%(SUB1,w,))
n=cur.execute("UPDATE SUBJECT_COMB SET SUB2='%s' where
EMAIL='%s'"%(A[0],w,))
o=cur.execute("UPDATE SUBJECT_COMB SET SUB3='%s' where
EMAIL='%s'"%(A[1],w,))
p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where
EMAIL='%s'"%(B,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(D,w,))
r=cur.execute("UPDATE SUBJECT_COMB SET STREAM='%s' where
EMAIL='%s'"%(subject,w,))
conn.commit()
elif Maths== 'N':
h=[SUB1,A[0],A[1],D,F]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("UPDATE SUBJECT_COMB SET SUB1='%s' where
EMAIL='%s'"%(SUB1,w,))
n=cur.execute("UPDATE SUBJECT_COMB SET SUB2='%s' where
EMAIL='%s'"%(A[0],w,))
o=cur.execute("UPDATE SUBJECT_COMB SET SUB3='%s' where
EMAIL='%s'"%(A[1],w,))
p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where
EMAIL='%s'"%(D,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(F,w,))
r=cur.execute("UPDATE SUBJECT_COMB SET STREAM='%s' where
EMAIL='%s'"%(subject,w,))
conn.commit()
elif value==0:
if Maths== 'Y':
h=[SUB1,A[0],A[1],B,D]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("UPDATE SUBJECT_COMB SET SUB1='%s' where
EMAIL='%s'"%(SUB1,w,))
n=cur.execute("UPDATE SUBJECT_COMB SET SUB2='%s' where
EMAIL='%s'"%(A[0],w,))
o=cur.execute("UPDATE SUBJECT_COMB SET SUB3='%s' where
EMAIL='%s'"%(A[1],w,))
p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where
EMAIL='%s'"%(B,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(D,w,))
r=cur.execute("UPDATE SUBJECT_COMB SET STREAM='%s' where
EMAIL='%s'"%(subject,w,))
conn.commit()
elif Maths== 'N':
h=[SUB1,A[0],A[1],D,G]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("UPDATE SUBJECT_COMB SET SUB1='%s' where
EMAIL='%s'"%(SUB1,w,))
n=cur.execute("UPDATE SUBJECT_COMB SET SUB2='%s' where
EMAIL='%s'"%(A[0],w,))
o=cur.execute("UPDATE SUBJECT_COMB SET SUB3='%s' where
EMAIL='%s'"%(A[1],w,))
p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where
EMAIL='%s'"%(D,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(G,w,))
r=cur.execute("UPDATE SUBJECT_COMB SET STREAM='%s' where
EMAIL='%s'"%(subject,w,))
conn.commit()
elif value==1:
h=[SUB1,A[0],A[1],E,H]
print('AS PER YOUR CHOICES YOUR SUBJECTS ARE =')
for i in h:
print(i)
m=cur.execute("UPDATE SUBJECT_COMB SET SUB1='%s' where
EMAIL='%s'"%(SUB1,w,))
n=cur.execute("UPDATE SUBJECT_COMB SET SUB2='%s' where
EMAIL='%s'"%(A[0],w,))
o=cur.execute("UPDATE SUBJECT_COMB SET SUB3='%s' where
EMAIL='%s'"%(A[1],w,))
p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where
EMAIL='%s'"%(E,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(H,w,))
r=cur.execute("UPDATE SUBJECT_COMB SET STREAM='%s' where
EMAIL='%s'"%(subject,w,))
conn.commit()
elif c==4:
w=input('Enter your Registered Email ID : ')
print('YOU WANT TO CHANGE YOUR PARTICULAR SUBJECT')
m=cur.execute('SELECT STUDENT_NAME FROM SUBJECT_COMB
WHERE EMAIL="%s"'%(w,))
f=cur.fetchone()
q=cur.execute('SELECT SUB1,SUB2,SUB3,SUB4,SUB5 FROM
SUBJECT_COMB WHERE EMAIL="%s"'%(w,))
o=cur.fetchall()
n=cur.execute('SELECT STREAM FROM SUBJECT_COMB WHERE
EMAIL="%s"'%(w,))
k=cur.fetchone()
r=cur.execute('SELECT SUB1,SUB2,SUB3 FROM SUBJECT_COMB
WHERE EMAIL="%s"'%(w,))
g=cur.fetchall()
l=cur.execute('SELECT SUB4,SUB5 FROM SUBJECT_COMB WHERE
EMAIL="%s"'%(w,))
L=cur.fetchall()
print('YOU ARE : ')
for n in f:
print(n)
print('YOUR SELECTED COMBINATION WAS : ')
for j in o:
for V in j:
print(V)
print('YOUR SELECTED STREAM WAS : ')
for m in k:
print(m)
s=m
print('THESE SUBJECTS ARE COMPULSORY SO WOULD NOT CHANGE
! ')
for i in g:
for j in i:
print(j)
print('YOU CAN CHANGE THE REMAINING SUBJECTS ! ')
for I in L:
for J in I:
print(J)
def maths():
if (s =='COMMERCE' or 'SCIENCE'):
global Maths
Maths = str(input(' Do you want Maths as a Subject : Press Y if Yes and
N if No : ' ))
if Maths == 'Y':
SUB4='MATHS'
return SUB4
else:
print('You do not want MATHS as a subject. You can further select a
subject from the list')
else:
pass

if s=='COMMERCE' or s=='SCIENCE':
B=maths()
D=sub5()
F=sub5s()
G=sub5c()
elif s=='HUMANITIES':
E=hum()
H=hum2()
if s=='SCIENCE':
if Maths == 'Y':
h=['ENGLISH','PHYSICS','CHEMISTRY',B,D]
print('AS PER YOUR CHANGES NEW SUBJECTS ARE =')
for i in h:
print(i)

p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where


EMAIL='%s'"%(B,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(D,w,))

conn.commit()
elif Maths== 'N':
h=['ENGLISH','PHYSICS','CHEMISTRY',D,F]
print('AS PER YOUR CHANGES NEW SUBJECTS ARE =')
for i in h:
print(i)

p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where


EMAIL='%s'"%(D,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(F,w,))

conn.commit()

elif s=='COMMERCE':
if Maths== 'Y':
h=['ENGLISH','BST','ACCOUNTS',B,D]
print('AS PER YOUR CHANGES NEW SUBJECTS ARE =')
for i in h:
print(i)

p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where


EMAIL='%s'"%(B,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(D,w,))

conn.commit()
elif Maths== 'N':
h=['ENGLISH','BST','ACCOUNTS',D,G]
print('AS PER YOUR CHANGES NEW SUBJECTS ARE =')
for i in h:
print(i)
p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where
EMAIL='%s'"%(D,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(G,w,))

conn.commit()

elif s=='HUMANITIES':
h=['ENGLISH','HISTORY','GEOGRAPHY',E,H]
print('AS PER YOUR CHANGES NEW SUBJECTS ARE =')
for i in h:
print(i)
p=cur.execute("UPDATE SUBJECT_COMB SET SUB4='%s' where
EMAIL='%s'"%(E,w,))
q=cur.execute("UPDATE SUBJECT_COMB SET SUB5='%s' where
EMAIL='%s'"%(H,w,))

conn.commit()
else:
pass
OUTPUT SCREENSHOT

1.The below image shows the list of things a student can do.
If the student is new and wants to select a combination he needs to PRESS 1.
If the student is old and want to view his selected combination he needs to PRESS 2
If the student is old and wants to change his chosen Stream he needs to PRESS 3.
If the student is old and wants to change his Particular Subject he needs to PRESS
4.
2. The above image is an interface when the Student is New and has PRESS 1.
First he was asked to enter a name. ( Vansh Dutt Pandey )
Then Email Address. ( vansh123 )
The Email Address was not in correct formation which endswith @gmail.com.
Therefore, he was asked to enter again. ( pandeyvansh45@gmail.com )
Then Stream ( SCIENCE ( Physics and Chemistry become compulsory )) , Want
Maths or Not ( Y ) , further subjects ( Computer Science )

The set of data was stored in the Database.


3.The below image is an interface when the Student is New and PRESS 1.
First he was asked to enter a name. ( Arpita Thapli )
Then Email Address. ( arpitathapli99@gmail.com )
Then Stream ( COMMERCE ( BST and Accounts become compulsory ))
Want Maths or Not ( N )
SUB4 ( 4 was pressed , Dance )
SUB5 ( Economics )
4.The above image is an interface when the Student is New and PRESS 1.
First he was asked to enter a name. ( Priyanshu Mamgain )
Then Email Address. ( priyanshu@gmail.com )
Then Stream ( HUMANITIES ( History and Geography become compulsory ))
SUB4 ( 1 was pressed , Psychology )
SUB5 ( 2 was pressed , Civics )
5.The below shows an ERROR which occurs when a Newstudent tries to enter his
data with an already existing Email Address. ( priyanshu@gmail.com was already
registered )
6.The below image is an interface when Student is Old and pressed 2.
Asked to enter a registered Email Address ( Being Primary key ).
( pandeyvansh@gmail.com )
The information stored gets displayed by the student with Email as above.
7.The below image is an interface when Student is Old and Press 3.
First asked to enter an Email Address. ( priyanshu@gmail.com )
Then to enter the new Stream ( as he wants to change it ). ( SCIENCE )
Want Maths or Not ( Y )
SUB 5 ( 1 was pressed , Computer Science )
8 A.The below image shows the subject combination chosen by the student at the
first time
8 B. But now the student ( Vansh pandey ) wants to change his combination so he
need to move to the other interface shown below:

The below images are the interface when Student is Old and Press 4.
First asked to enter Email. ( pvansh@gmail.com )
The stored data of the student was fetched.
Asked to select Subjects again. So that they can be changed.
( Maths ( N ) , Psychology ( Press 1 ) , Biology )

In the above image you can see subjects of student (Vansh pandey ) has been altered
FUTURE PROSPECT OF THE PROJECT

The project currently is accessible and made for student purposes through which a
student can select or edit their combinations.

Students who will use this program for the above purpose, their data would be
stored in a school authorised database. When all the students in a particular class
would select their combination and let it be stored in a particular place , it would be
easier for Teachers or other Staff and Admin members to access information related
to it rather than going to a particular student or in the main office.

Things Teachers would be able to do-


1. The Teacher would be able to know how many students have taken the particular
subject.
2. The teacher would be able to know the names of students who have taken a
particular subject.
3.The teacher would be able to know how many students are there in particular
Stream.
4. The teacher would be able to know who and how many students have taken
Maths as a subject or not .
5. The teacher would be able to access the full set of combinations the student has
chosen.
6. The stored data would help the Staff to divide students into sections and also help
in Time table making .
BIBLIOGRAPHY

1. Text Book - Computer Science with Python Grade XI and XII by Sumita
Arora
2. Text Book - Computer Science with Python Grade XI and XII by Preeti Arora
3. https://www.tutorialspoint.com/what-are-the-basic-concepts-of-python
4. https://www.educba.com/concept-of-python-programming/
5. https://www.javatpoint.com/mysql-tutorial
6. https://www.w3schools.com/MySQL/mysql_join.asp
7. https://realpython.com/python-mysql/
8. https://www.w3schools.com/python/python_mysql_getstarted.asp

You might also like