Computer Science Project
Computer Science Project
Computer Science Project
Certificate of Excellence
Acknowledgement
Introduction
Objectives of the project
System Requirements
a) Hardware Requirements
b) Software Requirements
Theoretical Background
a) Python
b) Database
c) MySQL
d) Python-MySQL Connectivity
Source Code of this Project
Output
Appendix
Future Enhancement of Project
Bibliography
INTRODUCTION
Hardware Requirements:
A computer with a modern processor and sufficient RAM is
suitable for running Python and a MySQL database. Adequate
storage space for the MySQL database and the Python program
files.
Software Requirements:
Windows 11 as Operating System
Python 3.7.7 as Front-end Developing software
MySQL as Back-end Software
MySQL.Connector for connecting both ends
MS Word or Google Docs for Documentation
Theoretical Background
1. Python-Simplified Programming Language:
❖ Syntax is easy
INTERACTIVE MODE:
Script Mode:
2. Database :
MySQL:
DROP TABLE
Syntax:
DROP TABLE [IF EXISTS] <table name>
DML:
SELECT COMMAND
Syntax:
SELECT (<column name list>)/* FROM <table
name> [WHERE <condition>];
UPDATE COMMAND
Syntax:
UPDATE<table name> SET<column name>=<value>
[WHERE<condition>];
3. PYTHON-MYSQL CONNECTIVITY:
c = cur.fetchone() or
c = cur.fetchmany(<no>) and/or
c = cur.rowcount
if conn.is_connected():
print('Connected successfully')
c_reg_no = c_count + 1
c_name = input("Enter Your Name: ")
#c_ refres to candidate
c_dob = input("Enter Your Date of Birth: ")
c_fg_na = input("Enter Your Father/Guardian
Name: ")
c_mg_na = input("Enter Your Mother/Guardian
Name: ")
c_gen = input("Enter Your Gender: ")
c_nati = input("Enter Your Nationality: ")
c_iden = input("Identity proof with photo
(Aadhar/Pancard/Bank passbook/Passport/Ration
Card/Election Card): ")
c_inum = input("Enter Identification Number: ")
c_cat = input("Enter Category (General/Gen-
EWS/OBC-NCL/SC/ST): ")
c_resi = input("Enter Place of Residence
(Urban/Rural): ")
c_pwd = input("Are you a Pwd Candidate?
(yes/no): ")
c_ai = int(input("Enter Annual Income: "))
c_ea = input("Exam Applied for
(B.E/B.Tech/B.Arch): ")
c_session = input("Session Applied for (1st/1st &
2nd): ")
c_medium = input("Exam Paper Medium
(English/Hindi/Others): ")
c_premisesno = input("House (Premises
No/Name): ")
c_locality = input("Enter Your Locality: ")
c_subl = input("Enter Your Sub Locality: ")
c_dis = input("Enter Your District: ")
c_state = input("Enter Your State: ")
c_country = input("Enter Your Country: ")
c_pin = int(input("Enter Pin code: "))
c_contact = input("Enter Your Contact No: ")
c_contact1 = input("Enter Another Contact No: ")
c_email = input("Enter Your Email: ")
values('{}','{}','{}','{}','{}','{}','{}','{}','{}','{}','{}',{},'{}',
'{}','{}','{}',
'{}','{}','{}','{}','{}',{},'{}','{}','{}',{})""".format(c_name,
c_dob,c_fg_na,c_mg_na,c_gen,c_nati,c_iden,c_inum,c_c
at,c_resi,c_pwd,c_ai,c_ea,c_session,c_medium,c_premis
esno,c_locality,c_subl,c_dis,c_state,c_country,c_pin,c_c
ontact,c_contact1,c_email,c_reg_no)
print("Registered Successfully Your Registration
Number is: ", c_reg_no)
c1.execute(c_sql)
conn.commit()
elif ch == 2:
else:
print("INVALID CHOICE PLEASE TRY
AGAIN")
else:
print('Connection failed')
OUTPUT
Creating a Database: