ch
Feedback
CBSE COMPUTER SCIENCE

CBSE COMPUTER SCIENCE

前往频道在 Telegram

QUESTION BANK, REFERENCE BOOK, LAB MANUAL , WORKSHEET ETC., PYTHON TEXT BOOK AND REFERENCE BOOKS, 01. ASK QUESTIONS AT https://t.me/joinchat/FJ1noGs-64I0OWI1

显示更多
549
订阅者
无数据24 小时
无数据7
无数据30
帖子存档
Preboard-1(Term 2)_XII.docx.docx0.38 KB

PreBoard-1(Term 2)_X.docx.docx0.18 KB

STUDY MATERIAL XII CS(TERM-II).pdf2.02 MB

S SHUNMUGA SUNDARAM, M.E, A.M.I.E, MISTE,. IAENGG, [3/20/2022 11:37 PM] Download Python packages from the link : https://www.lfd.uci.edu/~gohlke/pythonlibs/

Clarification Practicals Duration Term-II.pdf3.44 KB

OUTPUT: ================== RESTART: C:\Users\sml\Desktop\pywithsql.py ================== 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 1 Enter Employee Number :101 Enter Name :APPLE Enter Department :CS Enter Salary :18000 A RECORD INSERTED... 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 1 Enter Employee Number :102 Enter Name :MANGO Enter Department :MC Enter Salary :17000 A RECORD INSERTED... 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 1 Enter Employee Number :103 Enter Name :ORANGE Enter Department :BC Enter Salary :19000 A RECORD INSERTED... 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 5 EMPNO NAME DEPARTMENT SALARY 101 APPLE CS 18000.00 102 MANGO MC 17000.00 103 ORANGE BC 19000.00 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 2 Enter employee number to be updated 102 Enter salary to be updated 18000 A Record Updated 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 5 EMPNO NAME DEPARTMENT SALARY 101 APPLE CS 18000.00 102 MANGO MC 18000.00 103 ORANGE BC 19000.00 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 3 Enter employee number to be deleted102 Record(s) Deleted 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 5 EMPNO NAME DEPARTMENT SALARY 101 APPLE CS 18000.00 103 ORANGE BC 19000.00 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 4 Enter employee number to be searched103 EMPNO NAME DEPARTMENT SALARY 103 ORANGE BC 19000.00 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 4 Enter employee number to be searched105 Record not found 1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : 6 File closed successfully... >>>

#Python with Mysql import mysql.connector as mcr cn = mcr.connect(host='127.0.0.1',user='root',password="admin") cr = cn.cursor() cr.execute("create database if not exists company") cr.execute("use company") cr.execute("create table if not exists employee(empno int(12),empname varchar(50),edept varchar(30),salary decimal(12,2))") cn.commit() choice=int(input("1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : ")) while choice!=0: if choice==1: #INSERTING A RECORD e = int(input("Enter Employee Number :")) n = input("Enter Name :") d = input("Enter Department :") s = int(input("Enter Salary :")) query="insert into employee values({},'{}','{}',{})".format(e,n,d,s) cr.execute(query) cn.commit() print("A RECORD INSERTED...") elif choice == 2: #UPDATING A RECORD e=int(input("Enter employee number to be updated ")) s=int(input("Enter salary to be updated ")) query="update employee set salary={} where empno={}".format(s,e) cr.execute(query) print("A Record Updated ") cn.commit() elif choice == 3: #DELETING A RECORD e=int(input("Enter employee number to be deleted")) query="delete from employee where empno={}".format(e) cr.execute(query) print("Record(s) Deleted ") cn.commit() elif choice == 4: #SEARCHING A RECORD e=int(input("Enter employee number to be searched")) query="select * from employee where empno={}".format(e) cr.execute(query) result = cr.fetchall() if cr.rowcount==0: print("Record not found") else: print("EMPNO","NAME","DEPARTMENT","SALARY") for row in result: print(row[0],row[1],row[2],row[3]) cn.commit() elif choice == 5: #DISPLAYING RECORDS query="select * from employee" cr.execute(query) result = cr.fetchall() print("EMPNO","NAME","DEPARTMENT","SALARY") for row in result: print(row[0],row[1],row[2],row[3]) cn.commit() elif choice==6: #CLOSING DATABASE cn.close() print("File closed successfully...") break else: print("Invalid Choice...") choice=int(input("1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : "))

+2
GUI Tic Tac Toe.zip0.32 KB

+9
exam project.zip2.22 KB

+6
CS PROJECT REPORT TEMPLATE.zip0.30 KB

+9
2_Class XII Projects.zip3.60 MB

CS-QP-PRACTICAL EXAMINATION – 2021 - 2022.pdf2.06 KB

+6
Arihant Class 12 Term 2 Computer Science 2022.pdf7.93 MB

import mysql.connector as mcr cn = mcr.connect(host='127.0.0.1',user='root',password="admin") cr = cn.cursor() cr.execute("create database if not exists company") cr.execute("use company") cr.execute("create table if not exists employee(empno int(12),empname varchar(50),edept varchar(30),salary decimal(12,2))") cn.commit() choice=int(input("1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : ")) while choice!=0: if choice==1: #INSERTING A RECORD e = int(input("Enter Employee Number :")) n = input("Enter Name :") d = input("Enter Department :") s = int(input("Enter Salary :")) query="insert into employee values({},'{}','{}',{})".format(e,n,d,s) cr.execute(query) cn.commit() print("A RECORD INSERTED...") elif choice == 2: #UPDATING A RECORD eno=int(input("Enter employee number to be updated ")) sal=int(input("Enter salary to be updated ")) query="update employee set salary={} where empno={}".format(sal,eno) cr.execute(query) print("A Record Updated ") cn.commit() elif choice == 3: #DELETING A RECORD eno=int(input("Enter employee number to be deleted")) query="delete from employee where empno={}".format(eno) cr.execute(query) print("Record(s) Deleted ") cn.commit() elif choice == 4: #SEARCHING A RECORD eno=int(input("Enter employee number to be searched")) query="select * from employee where empno={}".format(eno) cr.execute(query) result = cr.fetchall() if cr.rowcount==0: print("Record not found") else: print("EMPNO","NAME","DEPARTMENT","SALARY") for row in result: print(row[0],row[1],row[2],row[3]) cn.commit() elif choice == 5: #DISPLAYING RECORDS query="select * from employee" cr.execute(query) result = cr.fetchall() print("EMPNO","NAME","DEPARTMENT","SALARY") for row in result: print(row[0],row[1],row[2],row[3]) cn.commit() elif choice==6: #CLOSING DATABASE cn.close() print("File closed successfully...") break else: print("Invalid Choice...") choice=int(input("1. ADD RECORD 2. UPDATE RECORD 3.DELETE RECORD 4. SEARCH 5.DISPLAY 6.EXIT : "))

IP_TERM-2_XII_2022.pdf5.43 MB

+1
12CS-COMPUTER NETWORK QB -PART-1.pdf5.21 KB

CS Study Material (XII) - Term 2.pdf17.00 MB

photo content