The document is the question paper for the Computer Science practical examination. It contains 4 questions worth a total of 30 marks.
Question 1 has 2 parts worth a total of 12 marks. Part A involves writing Python functions to analyze a text file and write/read student records to/from a binary file. Part B involves writing SQL queries to fetch, insert, and display records from a MySQL database table.
Question 2 is worth 7 marks and involves submitting a report file. Question 3 is worth 8 marks and involves completing a project. Question 4 worth 3 marks involves an oral examination. The paper provides space for external and internal examiner details.
The document is the question paper for the Computer Science practical examination. It contains 4 questions worth a total of 30 marks.
Question 1 has 2 parts worth a total of 12 marks. Part A involves writing Python functions to analyze a text file and write/read student records to/from a binary file. Part B involves writing SQL queries to fetch, insert, and display records from a MySQL database table.
Question 2 is worth 7 marks and involves submitting a report file. Question 3 is worth 8 marks and involves completing a project. Question 4 worth 3 marks involves an oral examination. The paper provides space for external and internal examiner details.
The document is the question paper for the Computer Science practical examination. It contains 4 questions worth a total of 30 marks.
Question 1 has 2 parts worth a total of 12 marks. Part A involves writing Python functions to analyze a text file and write/read student records to/from a binary file. Part B involves writing SQL queries to fetch, insert, and display records from a MySQL database table.
Question 2 is worth 7 marks and involves submitting a report file. Question 3 is worth 8 marks and involves completing a project. Question 4 worth 3 marks involves an oral examination. The paper provides space for external and internal examiner details.
A. 1) Write a function in Python that counts the number of “Me” or “My” words present in a text file “STORY.TXT” (4) 2) Write function WriteStudent() to write the Records of 5 Students (admno, name, fee) in a binary file name “stud.dat”, and Write function Display() those records from a binary which fee is less than 1500. OR Write function AddEmployee() to write the Records of 5 Employees (empid, ename, salary) in a CSV file name “emp.csv”, and Write function ShowEmp() to display all records from a CSV file.
B. A table Drug is created in the database Medicine. The details of table are given below. (4)
import mysql.connector as sqltor
mycon = sqltor.connect( ) #1 cursor = mycon.cursor( ) cursor.execute( ) #2 data = #3 for rec in data: print ( rec ) #4 mycon.close( ) a. Complete the statement #1 to write appropriate missing parameter and values. b. Write the statement #2, to fetch drugName, and price from table Drug in descending order of price. c. Complete the statement #3, to fetch only three records from the resultset. d. What statement you will write in place of statement #2 to insert one more record in table Drug, as well as in statement #4, to make your changes permanent in the table Drug. Q.2 Report File (7) Q.3 Project (8) Q.4 Viva voce (3)
External Examiner Internal Examiner
Name : Name : Sign : Sign : Examiner No: Examiner No: