0% found this document useful (0 votes)
4 views

Computer 12

The document outlines a project focused on creating a management system for anime streaming services using MySQL and Python. It includes sections for acknowledgments, an introduction to the project, program code, output examples, and a bibliography. The program allows users to add, modify, delete, and search for anime information within various streaming services.

Uploaded by

beenasreepuram
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Computer 12

The document outlines a project focused on creating a management system for anime streaming services using MySQL and Python. It includes sections for acknowledgments, an introduction to the project, program code, output examples, and a bibliography. The program allows users to add, modify, delete, and search for anime information within various streaming services.

Uploaded by

beenasreepuram
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 22

INDEX

1) Acknowledgement

2)Introduction

3)Program Code

4)Output

5)Bibilography
Acknowledgement

First and formost, I would like to take this opportunity to


thank God Allmighty for his constant support throughout
this project. Next I want to thank Ms. Asha Paulose
without whom this project could not have been done. I
would also like to thank the School Management for
providing the necessary facilities to learn and use MySQL
and Python. Lastly, I thank my parents for being with me
morally and financially.
INTRODUCTION
As we all know, there are my types of streaming services around
us. Anime is a slang for Japanese Animation, and ever since the
start of the Pandemic and quarentine, the Popularity of Anime
has Skyrocketed, and so has its demand on streaming platforms.

This program was created to ease the situation of an anime


watcher, and help them check if an anime they want is available
in the streaming service or no.

PROGRAM CODE

import mysql.connector as ms
cn=ms.connect(host='localhost',user='root',pas
swd='toch',\
database='anime', charset='utf8')
crsr=cn.cursor()
def nstrm():
b=input('Enter the streaming service Name:')
crsr.execute('create table %s(Slno int primary
key,\
animenm varchar(50) not null,\
maincharecter varchar(50) not null,\
ended varchar(50) not null,\
rating int,\
episodes integer)'%(b,))
print('New anime Successfully Created\n')
#Anime streaming service has been taken as YT
for project.

def nanme(): #Adding details of a new product


n=input('Enter the anime Name: ')
s=int(input('Enter the Serial Number: '))
m=input('Enter the main charecters name: ')
e=input('has it ended? : ')
p=int(input('Enter the rating: '))
q=int(input('Enter the no of episodes: '))
crsr.execute('insert into yt
values(%s,"%s","%s","%s",%s,%s) '
%(s,n,m,e,p,q))
cn.commit()
print('Anime Details Successfully Stored\n')
def modanime(): #Modifying or updating the
records
sl=int(input('Enter the Serial Number of the
Anime: '))
print('1.rating','2.episodes',sep='\n')
c =int(input('Enter the Criteria to be modified
(1 or 2): '))
if c == 1:
p=int(input('Enter the New rating: '))
crsr.execute('update aot set rating = %s
where Slno = %s '%(p,sl))
cn.commit()
print('rating Successfully Updated\n')

elif c == 2:
q=int(input('Enter the New episodes: '))
crsr.execute('update aot set Qnty = %s where
Slno = %s '%(q,sl))
cn.commit()
print('episodes Successfully Updated\n')

def delanim(): #Deleting a record


print('To Delete on the Basis of:','1.Serial
Number','2.Ended or Not',sep='\n')
c =int(input('Enter the Choice (1 or 2): '))
if c == 1:
sl=int(input('Enter the Serial Number of the
Product:\ '))
crsr.execute('delete from aot where Slno =
%s ' %(sl,))
cn.commit()
elif c == 2:
ex=input('Enter the ended or not status
(Y/N): ')
crsr.execute('delete from aot where ended
= "%s" ' %(ex,))
cn.commit()
print('anime Deleted Successfully \n')

def ser():
s=int(input('Enter the anime serial Number: '))
crsr.execute('select* from aot where Slno=%s'%
(s,))
f=crsr.fetchone()
if f == None:
print('No Such Record Available in the
System\n')
else:
print('Anime Found')
for i in f:
print(i, end='\t')
print()

def allanim():
crsr.execute('select* from aot')
print('All Products in aot: ')
for x in crsr:
print(x)
print()
def allstrm(): #Displaying all the tables
print('All streaming services in the Database:')
crsr.execute('show tables')
for x in crsr:
print(x)
print()

print("\nAnime Watchlist Management")


while True:
print()
print('\nMENU:',
'1.Add a New streaming service',
'2.Add a New anime',
'3.Modify / Update anime Details',
'4.Delete anime',
'5.Search for anime Information',
'6.View All animes in a streaming serivce',
'7.View All the strwaming services',
'8.Exit',sep='\n')
ch=int(input('\nEnter the Choice (1 to 8): '))
print()
if ch==1:
nstrm()
elif ch==2:
nanme()
elif ch==3:
modanime()
elif ch==4:
delanim()
elif ch==5:
ser()
elif ch==6:
allanim()

elif ch==7:
allstrm()
elif ch==8:
cn.close()
break
else:
print('Invalid Option')
OUTPUT

first output screen(python)

in mysql
2nd output screen in python

in mysql
3rd output screen

in mysql
4th output screen python

in mysql

5th output screen in python


6th output screen in python
7th output screen in python

8th output screen in python


BIBILOGRAPHY
[1] PREETI ARORA “Computer Science with
Python” 2021 Edition

You might also like