This document outlines the practical examination for Class XII Computer Science students. It includes 7 marks for a Python programming question with options like writing recursive functions or creating graphs and charts from data. Another 3 marks are for a question on Python database connectivity to MySQL, with options to create, insert, and fetch records from a table. The remaining 11 marks are for a report file, project file, and vivas on both.
This document outlines the practical examination for Class XII Computer Science students. It includes 7 marks for a Python programming question with options like writing recursive functions or creating graphs and charts from data. Another 3 marks are for a question on Python database connectivity to MySQL, with options to create, insert, and fetch records from a table. The remaining 11 marks are for a report file, project file, and vivas on both.
SESSION 2019-20 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ School Code : 55444 KENDRIYA VIDYALAYA HONGKONG Class : XII Subject : COMPUTER SCIENCE NEW (083) Time Duration : 3 hours MAXIMUM MARKS : 30 ---------------------------------------------------------------------------------------------------------------------------------- 1. Python Program (Any one) 7 Marks a. Write recursive function in python for the following i. Find sum of first n natural numbers ii. Sum of all elements in a list b. Write recursive function in python to i. Find the factorial of a number ii. Display the Fibonacci series c. Write Python program i. to count the number of vowels in a file ii. To count the number of words in a file d. i. The marks obtained by Sohan in an examination are given below Subject Englihs Hindi Math Science Social Marks Obtained 105 75 150 120 90 Write the code in Python to represent above data in Pie Chart ii. The area under wheat cultivation last year in the following states corrected to the nearest lacs hectares was State Punjab Haryana UP MP Maharashtra Rajasthan Cultivated 220 120 100 40 80 30 Plot a bar graph for the data. Give a yellow border to each e. i. Write a program in Python to read lines from a text file DIARY.TXT and display those lines which start with the alphabet 'P'. ii. Write a program in Python to read the text file "DATA.TXT" and count the number of times "my" occurs in the file. f. Write a program to create a Stack called Employee to perform i. PUSH operation on Stack ii. POP operation on Stack 2. Python interface with MySQL (Any one) 3 Marks a. Write a python database connectivity program to create a table name ‘student’ with attributes rollno, name, marks and perform the following operations i. Insert at least 5 records ii. Fetch and show student records b. Write a python database connectivity program to create a table name ‘book’ with attributes bookno, title, price and perform the following operations i. Insert at least 5 records ii. Fetch and show book detail c. Write a python database connectivity program to create a table name ‘employee’ with attributes empno, ename, salary and perform the following operations i. Insert at least 5 records ii. Fetch and show employee detail 3. Report File and Viva voce 7+2 4. Project File and Viva voce 8+3
Sign of Internal Examiner Sign of External Examiner