0% found this document useful (0 votes)
134 views24 pages

Acknowledgement: Niharika Sharma XII Science

The student has created a Python program to manage a student database using lists and functions. The program displays a menu allowing the user to view the student list, add a new student, search for a student, or remove a student. It uses exceptions for input validation and global variables to access the student list from functions. Based on the user's selection, it will print the list, prompt for a new student name, search the list, or remove a student.

Uploaded by

max mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views24 pages

Acknowledgement: Niharika Sharma XII Science

The student has created a Python program to manage a student database using lists and functions. The program displays a menu allowing the user to view the student list, add a new student, search for a student, or remove a student. It uses exceptions for input validation and global variables to access the student list from functions. Based on the user's selection, it will print the list, prompt for a new student name, search the list, or remove a student.

Uploaded by

max mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 24

ACKNOWLEDGEMENT

I would like to express my special thanks of


gratitude to my teacher Mr. Praveen Verma, who
gave me the golden opportunity to do this
wonderful project of Computer Science on “Student
Management System”. I came to know about so
many things I am really thankful to them. Secondly I
would also like to thank my parents and friends who
helped me a lot in finalizing this project within the
limited time frame

Niharika Sharma
XII Science

1
CERTIFICATE
This is to certify that Niharika Sharma of class
XII of Marwah Modern School has successfully
completed his/her project work for the subject
‘Chemistry’ for class XII practical examination of
the Central Board of Secondary Education in
the year (mention the academic year).

I further certify that this project is the individual


work of the student.

Signature:

Date:

2
INDEX
S,No Title Page Remarks
. No.

1 Introduction 4

2 Objectives f the Project 5

3 Hardware and Software 6


Specifications

4 What is Python? 7-8

5 What is MySQL? 9

6 Source Code 10-12

7 Output 13

9 Functions and modules used in 14-16


project

9 Python Programs 17-23

10 Conclusion 23

11 Bibliography 24

3
INTRODUCTION
Schools and Universities are the foundation of
knowledge and an educational body on which students
rely upon. Therefore, they need to maintain a proper
database of its students to keep all the updated records
and easily share information with students.
Most schools and Universities count on an advanced
software tool knows as 'Student Information System
(SIS)' to keep all their student records and
administrative operations including, examinations,
attendance, and other activities.
Over the recent years, the performance and efficiency of
the education industry have been enhanced by using the
Student Management System. This tool has
productively taken over the workload of the admin
department with its well-organized, easy, and reliable
online school management software.

4
OBJECTIVES OF
THE PROJECT
To get the basic overview of Python and MySQL
To understand the student management system
using my Python and MySQL
To know more about Python programming
with some examples

5
HARDWARE AND
SOFTWARE SPECIFICATIONS
 Hardware

Model name - HP Pavilion dv6

Memory – 6 Gb DDR4

Video Card – Intel HD 3000

Storage – 1TB HDD
 Software
Python 3.7 32-bit

MySQL 8.0

6
PYTHON
 Overview
Python is a high-level, standard-purpose programming language. Its design philosophy
emphasizes code clarity with using tremendous indentation. Its language constructs and item-
oriented method aim to help programmers write clean, logical code for small- and big-scale
initiatives.

Python is dynamically-typed and rubbish-amassed. It helps a couple of programming


paradigms, along with established (specifically procedural), object-oriented and useful
programming. it's miles regularly defined as a "batteries included" language due to its complete
popular library.

Guido van Rossum started operating on Python inside the overdue Eighties as a successor to
the ABC programming language and first released it in 1991 as Python 0.9.0. Python 2.0 was
released in 2000 and added new features which include list comprehensions, cycle-detecting
garbage series, reference counting, and Unicode assist. Python 3.zero, released in 2008,
became a first-rate revision that isn't completely backward-well suited with earlier variations.
Python 2 changed into discontinued with model 2.7.18 in 2020.

Python constantly ranks as one of the most famous programming languages.

 Syntax and Semantics

Python is supposed to be an easily readable language. Its formatting is visually uncluttered, and
often uses English keywords in which different languages use punctuation. in contrast to many

7
other languages, it does now not use curly brackets to delimit blocks, and semicolons after
statements are allowed however not often used. It has fewer syntactic exceptions and
unique instances than C or Pascal.

 Indentation
Python uses whitespace indentation, in place of curly brackets or keywords, to delimit blocks.
An increase in indentation comes after sure statements; a lower in indentation indicates the
stop of the modern-day block. as a consequence, this system's visible structure appropriately
represents its semantic shape. this selection is on occasion termed the off-side rule. a few
different languages use indentation this manner; however in most, indentation has no semantic
meaning. The advocated indent length is four areas.

8
What is MySQL?
 Overview
MySQL is an open-source relational database management device (RDBMS). Its call is a
combination of "My", the call of co-founder Michael Widenius's daughter, and "sq.", the abbreviation
for established question Language. A relational database organizes information into one or more
statistics tables wherein records sorts can be related to every other; those relations assist structure
the facts. square is a language programmers use to create, adjust and extract data from the
relational database, as well as manipulate person access to the database. similarly to relational
databases and square, an RDBMS like MySQL works with an working device to put into effect a
relational database in a pc's garage system, manages customers, permits for network access and
helps checking out database integrity and creation of backups.

MySQL is unfastened and open-supply software program below the phrases of the GNU
trendy Public License, and is likewise to be had beneath a variety of proprietary licenses.
MySQL became owned and sponsored via the Swedish employer MySQL AB, which turned
into bought by way of solar Microsystems (now Oracle company). In 2010, while Oracle
obtained solar, Widenius forked the open-supply MySQL task to create MariaDB.

MySQL has stand-on my own customers that permit customers to have interaction immediately
with a MySQL database the use of sq., however extra regularly, MySQL is used with different
applications to put in force applications that need relational database functionality. MySQL is a
part of the LAMP web software software stack (and others), that's an acronym for Linux,
Apache, MySQL, Perl/Hypertext Preprocessor/Python. MySQL is used by many database-
driven web packages, inclusive of Drupal, Joomla, phpBB, and WordPress. MySQL is likewise
used by many famous web sites, together with fb, Flickr, MediaWiki, Twitter, and YouTube.

9
SOURCE CODE
import os
import platform

global listStd #Making ListStd As Super Global Variable listStd =


["yugesh", "kishor", "gajen", "Gopi"] #List Of Students

def manageStudent(): #Function For The Student Management System

x = "#" * 30
y = "=" * 28
global bye #Making Bye As Super Global Variable
bye = "\n {}\n# {} #\n# ===> Brought To You By <=== #\n# ===> code-
projects.org <=== #\n# {} #\n {}".format(x, y, y, x) # Will Print GoodBye Message

#Printing Welcome Message And options For This Program


print("""

------------------------------------------------------
|======================================================|
|======== Welcome To Student Management System ========| |
======================================================|
------------------------------------------------------

Enter 1 : To View Student's List


Enter 2 : To Add New Student
Enter 3 : To Search Student
Enter 4 : To Remove Student

""")

try: #Using Exceptions For Validation


userInput = int(input("Please Select An Above Option: ")) #Will Take Input
From User
except ValueError:
exit("\nHy! That's Not A Number") #Error Message
else:
print("\n") #Print New Line

#Checking Using Option


if(userInput == 1): #This Option Will Print List Of Students

10
print("List Students\n")
for students in listStd:
print("=> {}".format(students))

elif(userInput == 2): #This Option Will Add New Student In The List
newStd = input("Enter New Student: ")
if(newStd in listStd): #This Condition Checking The New Student
Is Already In List Ur Not
print("\nThis Student {} Already In The Database".format(newStd))
#Error Message
else:
listStd.append(newStd)
print("\n=> New Student {} Successfully Add \n".format(newStd))
for students in listStd:
print("=> {}".format(students))

elif(userInput == 3): #This Option Will Search Student From The List
srcStd = input("Enter Student Name To Search: ")
if(srcStd in listStd): #This Condition Searching The Student
print("\n=> Record Found Of Student {}".format(srcStd))
else:
print("\n=> No Record Found Of Student {}".format(srcStd)) #Error
Message

elif(userInput == 4): #This Option Will Remove Student From The List
rmStd = input("Enter Student Name To Remove: ")
if(rmStd in listStd): #This Condition Removing The Student From The List
listStd.remove(rmStd)
print("\n=> Student {} Successfully Deleted \n".format(rmStd))
for students in listStd:
print("=> {}".format(students))
else:
print("\n=> No Record Found of This Student {}".format(rmStd))
#Error Message

elif(userInput < 1 or userInput > 4): #Validating User Option


print("Please Enter Valid Option") #Error Message

#brought to you by code-projects.org


manageStudent()

def runAgain(): #Making Runable Problem1353


runAgn = input("\nwant To Run Again Y/n: ")
if(runAgn.lower() == 'y'):

11
if(platform.system() == "Windows"): #Checking User OS For Clearing The
Screen
print(os.system('cls'))
else:
print(os.system('clear'))
manageStudent()
runAgain()
else:
quit(bye) #Print GoodBye Message And Exit The Program

runAgain()

12
OUTPUT

13
FUNCTIONS USED IN
PROJECT
 The print()function
The print() function prints the specified message to the screen, or other standard
output device.

The message can be a string, or any other object, the object will be converted into a string
before written to the screen.

 The input() function


The input() function allows user input.

 The int() function


The int() function converts the specified value into an integer number.

14
MODULES USED IN PROJECT
 Th OS module
 It is possible to automatically perform many operating system tasks. The
OS module in Python provides functions for creating and removing a
directory (folder), fetching its contents, changing and identifying the current
directory, etc.
 You first need to import the os module to interact with the underlying
operating system. So, import it using the import os statement before using
its functions.

In this project, the os.system function is used

 os.system() method execute the command (a string) in a subshell. This method is


implemented by calling the Standard C function system(), and has the same
limitations. If command generates any output, it is sent to the interpreter standard
output stream. Whenever this method is used then the respective shell of the
Operating system is opened and the command is executed on it.

15
 The platform module

The Platform module is used to retrieve as much possible information about the
platform on which the program is being currently executed. Now by platform info,
it means information about the device, it’s OS, node, OS version, Python version,
etc. This module plays a crucial role when you want to check whether your
program is compatible with the python version installed on a particular system or
whether the hardware specifications meet the requirements of your program.

This module already exists in the python library and does not require
any installation using pip.

In this project, the platform.system function is used

16
Python Programs
 Program 1 – Binary searching in an array
Input –

17
Output –


Program 2 – Linear searching in an
array Input –

Output –
18

Program 3 – Deletion of an element from a
sorted linear list

Input –

Output –

19

Program 4 – Python program to
demonstrate slicing of lists in array
Input –

Output -

20
21
 Program 5 - To demonstrate how
to update an element in array
Input –

Output –

22
CONCLUSION
Through this project, a comprehensive and interactive student
management system has been made, with proper source code. This
project can be used in schools from the proper track record of students
studying the school, on a larger level.

With proper knowledge of the libraries and functions used to create this
software, we can understand the working of management systems.
These systems are intensively used in schools, banks, restaurants etc.
This and related management softwares help a particular organization in
streamlining the process of management and data handling.

The libraries and functions used in python in making of this software have a
wide range of use. Interlinking of python and MySQL opens up a new
range of opportunities for different sorftares to be made, hence, could be of
great use.

23
BIBLIOGRAPHY
1. Computer Science with Python – Class XII. By Sumita Arora
2. A Project Report on Student Management System. By:
Niharika Sharma

24

You might also like