Professional Documents
Culture Documents
CS Sumit
CS Sumit
CS Sumit
SESSION 2023-2024
SUMEET KUMAR
B
CS PROJECT FILE SESSION 2023-2024 CLASS-12
CERTIFICATE
4 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends
largely on the encouragement and guidelines of many others. I take
this opportunity to express my gratitude to the people who have
been instrumental in the successful completion of this project.
The guidance and support received from all the members who
contributed and who are contributing to this project, was vital for
the success of the project. I am grateful for their c constant support
and help
4 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
Entry 5 - Add a negative entry (If a person had returned some of debt money)
Entry 6 - Deletes old debtor
Entry 7 - Know all data of a debtor
Entry 8 – Exit the program
5
CS PROJECT FILE SESSION 2023-2024 CLASS-12
PROCESS
FIRSTLY, we have done the planning in a paper work regarding what
must do on the assigned project “E-Account.”
SECONDLY, we discussed our planning with our subject teacher
and then he provided us the right path to perform the work.
NEXT, we started our project on foot paths of our subject teacher.
THEN, we started our coding; coding took around 2 and half months
for completion.
NEXT, we analyzed the mistakes done and then we corrected them.
THEN, we prepared the project format as shown
PRINCIPAL.
6
CS PROJECT FILE SESSION 2023-2024 CLASS-12
# OBJECTIVE
The objective of this project is to give shopkeeper an
effective way to keep account of the person who has
buy product without giving money or giving fewer
amounts then the actual price
They can also see name of all person who had bought
something without giving money easily.
7
CS PROJECT FILE SESSION 2023-2024 CLASS-12
8
CS PROJECT FILE SESSION 2023-2024 CLASS-12
# Python Code
import
mysql.connector
import datetime
import time
def
adduser(a):
q="CREATE TABLE "+a+"(Date date,money_taken
int,money_returned int)"
cursor.execute(q)
mydb.commit()
def adduserstr(a):
if type(a)==str:
adduser(a)
def
addentry(a,b):
date=datetime.date.today()
q="INSERT INTO "+a+"(Date,money_taken)VALUES(%s,
%s)" cursor.execute(q,(date,b))
mydb.commit()
def addnegentry(a,b):
date=datetime.date.today()
q="INSERT INTO "+a+"(Date,money_returned)VALUES(%s,
%s)" cursor.execute(q,(date,b))
mydb.commit()
def greet():
print("Your data has been updated")
x=0
for i in range(3):
username=input("Enter the user name of
mysql:") password=input("Enter the password of
mysql:") x=i+1
try:
9
CS PROJECT FILE SESSION 2023-2024 CLASS-12
mydb=mysql.connector.connect(host='localhost',user=username,passwd
10
CS PROJECT FILE SESSION 2023-2024 CLASS-12
=password)
except
mysql.connector.errors.ProgrammingError:
print("User name or Password is wrong")
print("try again")
print(i+1)
if i==2:
print("Something went
wrong") print("try again later")
break
continue
else:
break
if x<3:
if mydb.is_connected():
print("Connected to MySQL Server version \
n") time.sleep(.5)
cursor=mydb.cursor()
cursor.execute("show databases")
databases=[]
for i in cursor:
databases.append(i[0])
d="khata"
if d in databases:
cursor.execute("use khata")
elif d not in databases:
cursor.execute("create database khata")
cursor.execute("use khata")
while mydb.is_connected:
all_user=[]
cursor.execute("show tables")
for i in cursor:
all_user.append(i[0])
print()
print("-type 1 to show name of all debtor")
11
CS PROJECT FILE SESSION 2023-2024 CLASS-12
greet ()
11 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
else:
print(a,"doesn’t exist")
elif choice==4:
a=input("Enter the name of debtor who's debt you want
to know:")
if a in all_user:
total=0
q="SELECT SUM(money_taken) FROM "+a
cursor.execute(q)
for i in cursor:
total=total+int(i[0])
p="SELECT SUM(money_returned) FROM "+a
cursor.execute(p)
for i in cursor:
total=total-int(i[0])
print("Total amount of money=",total)
else:
print(a,"doesn’t exist")
elif choice==5:
a=input("Enter the name of debtor who's data is to update :")
if a in all_user:
b=input("Enter the amount of money:")
addnegentry(a,b)
greet()
else:
print(a,"doesn’t exist")
elif choice==6:
a=input("Enter the name of debtor who's data is to
be delete:")
if a in all_user:
print("Are you sure you want to delete all data of ",a)
print("y/n")
b=input()
while True:
11 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
if b=="y" or b=="Y":
q="drop table "+a
cursor.execute(q)
mydb.commit()
greet()
break
elif b=="n" or b=="N":
break
else:
print("type y or n")
continue
else:
print(a,"doesn’t exist")
elif choice==7:
a=input("Enter the name of debtor who's data you want
to know:")
if a in all_user:
q="SELECT * FROM
"+a
cursor.execute(q)
print("Date |Money Taken |Money
Returned") for i in cursor:
print(i[0],"|",i[1],"|",i[2])
mydb.commit()
else:
print(a,"doesn’t exist")
print()
elif(choice==8):
print("BYE")
time.sleep(.6)
break
12 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
else:
print("type a number from above ")
time.sleep(.5)
print("Came again later")
time.sleep(.5)
13 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
Output
Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC
v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for
more information.
========== RESTART:
C:\Users\times\OneDrive\Documents\project\khata.py =========
Enter the user name of mysql:root
Enter the password of mysql:aksh
Connected to MySQL Server
version
14 GSBV,BURARI
Sumeet Kumar
5
15 GSBV,BURARI
Sumeet
Kumar
6
16 GSBV,BURARI
Sumeet
Kumar
7
17 GSBV,BURARI
Sumeet
Kumar
8
18 GSBV,BURARI
Sumeet
Kumar
9
19 GSBV,BURARI
Sumeet
Kumar
10
Database
| performance_schema |
| sakila |
| sys |
| world |
+ -+
9 rows in set (0.00 sec)
11 GSBV,BURARI
Sumeet
0
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
mysql> use
khata;
Database
changed
mysql> show
tables;
+ -+
| Tables_in_khata |
+ -+
| aniket |
| priyansh |
+ -+
2 rows in set (0.00
sec) mysql> select
* from aniket;
+ + + +
| Date | money_taken | money_returned |
+ + + +
| 2022-03-03 | 7000 | NULL |
| 2022-03-03 | 3000 | NULL |
+ + +
+ 2 rows in set
(0.00 sec)
20 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
20 GSBV,BURARI
Sumeet
Kumar
CS PROJECT FILE SESSION 2023-2024 CLASS-12
TESTING
Software Testing is an empirical investigation conducted to provide
With Information about the quality of the product or service under
test stakeholders a with respect to the context which it is intended to
operate. Software Testing also provides an objective, independent
view of the software to allow the business to appreciate and
understand the risks at implementation of the software. Test
techniques include, but are not limited to, the process of executing a
program or application with the intent of finding software bugs. It
can also be stated as the process of validating and verifying that a
software program/application/product meets the business and
technical requirements that guided its design and development, so
that it works as expected and can be implemented with the same
characteristics. Software Testing, depending on the testing method
employed, can be implemented at any time in the development
process, however the most test effort is employed after the
requirements have been defined and coding process has been
completed.
TESTING METHODS
Software testing methods are traditionally divided into black box
testing. These one approaches are used to describe the point of view
that a test engineer takes when designing test cases.
21 GSBV,BURARI
Sumeet
CS PROJECT FILE SESSION 2023-2024 CLASS-12
SPECIFICATION-BASED TESTING
Specification-based testing aims to test the functionality of software
according to the applicable requirements. Thus, the tester inputs
data into, and only sees the output from the test object. This level of
testing usually requires through test cases to be provided to the
tester, who they test that for a given input. The output value (or
behaviour), either RUUPE value specified in the test case.
Specification-based testing is necessary, but it is insufficient to guard
against certain risks.
22 GSBV,BURARI
Sumeet
CS PROJECT FILE SESSION 2023-2024 CLASS-12
REFRENCE
1. python.org
2. S P SHARMA CLASSES App and Website
3. YouTube
4. Our Subject Teacher S P Sharma Sir
5. Preeti Arora and Sumita Arora python
class 12 Book
6. LearnPython.org
7. Google
23 GSBV,BURARI
Sumeet