11

Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

Embed Size (px)

Citation preview

Page 1: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification
Page 2: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

OSWAAL BOOKS“Oswaal House” 1/11, Sahitya Kunj, M.G. Road, AGRA-282002Ph.: 0562-2857671, 2527781, Fax : 0562-2854582, 2527784

email : [email protected], website : www.oswaalbooks.com

Published by :

Class 12

Sample Question

Papers

Computer Science

Strictly Based on Latest Syllabus Issued by CBSEfor 2015 Examination

*Solutions for SQP 6-10 can be downloaded from www.oswaalbooks.com

(Based on Python)

Page 3: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

Our Distributors

© Publisher

Typeset by : C-Set Graphics

Printed by : M.M. Printers

0909

Page 4: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

[ iii ]

Contents n Syllabus v - vii

1. Sample Question Papers (Solved)

n Sample Question Paper 1 9 - 13

n Sample Question Paper 2 14 - 17

n Sample Question Paper 3 18 - 22

n Sample Question Paper 4 23 - 26

n Sample Question Paper 5 27 - 31

2. Sample Question Papers (Unsolved)

n Sample Question Paper 6 32 - 35

n Sample Question Paper 7 36 - 39

n Sample Question Paper 8 40 - 42

n Sample Question Paper 9 43 - 45

n Sample Question Paper 10 46 - 48

3. Solutions

n Sample Question Paper 1 49 - 55

n Sample Question Paper 2 56 - 62

n Sample Question Paper 3 63 - 71

n Sample Question Paper 4 72 - 79

n Sample Question Paper 5 80 - 87

* SOLUTIONS for Sample Question Paper 6 to 10 can be downloaded from www.OswaalBooks.com

Page 5: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

Believe in YourselfThis is the foremost barrier to be crossed for scoring high marks in exams. One needs to believe in his / her

ability to learn, memorize and reproduce what has been learnt. Exams are nothing but the test of our faith, confidence and knowledge.

Follow a Time – TableA well set time table allotting specific durations for studying, sleeping, playing/surfing the net and eating

can help every student a lot. Every above quoted thing has to be done every day. A proper schedule can help a student beat examination stress.

Set Every Day GoalsPreparations should be done every day to excel at the day of exams without depending upon any miracle

capsule to bail you out at the last moment. By setting everyday targets and goals, one can achieve incredible results in terms of efficiency and performance.

Take care of your HealthHealth is wealth. This adage never fails. Only a sound body and sound mind can work effectively towards

achieving any objective. Thus to sum up, healthy body is a mandate for rigorous mental exercise that comes up during examinations.

Practice DailyWe eat daily, we sleep daily, so why not study daily?

Regular practice in every subject will keep students close to a subject. If one avoids any subject for more than three days in a go, he/she is bound to lose interest in it.

1.TIPS N

How to Score

2.

3.

OSWAAL Your Elixir of Positivity & Confidence Positivity and confidence can do wonders to your grades,

far more than you can think. By studying from Oswaal Sample Question papers, you develop confidence in yourself which makes you positive and hence gives you the winners advantage!! A bunch of important questions along with their systematic presentation helps you tremendously in studying effectively.

OSWAAL - Your Planner For Examination PreparationsYou must make a schedule for your studies followed by

strict implementation of that schedule. Oswaal SQP's give you questions on the important topics or topics which need more practice or time. Oswaal SQP's include last year exam questions as well as sample papers for the proper schedule of your study. You may also study with your friends and make the entire learning process fun!!

OSWAAL - Your Confidence Booster Just before the ExamOne should never try to read, study or cram anything new

just before the beginning of your exam. You can just open your Oswaal SQP's and read through the answers highlighted by you a night before for the last time and then put away all your books. This gives you a new wave of confidence just before the commencement of your exam!

4.

5.

High in your Examination?

How to get 6.

7.

8.

9.

10.

1.

2.

3.

Play GamesPlaying games – both the indoors and

outdoors, help in inculcating a practical approach towards dealing with a problem along with beating the examination stress.

PresentationTill now we have discussed the pre-exam tips.

This is a crucial tip while writing the examinations. A systematic and neat display of answers can boost your chances of scoring high.

Time ManagementYou need to manage time not only during

exam preparations, but also at the time of solving the Question paper. Carrying a wrist watch during exams is an excellent way to manage time well. You should also try to save some time at the end of the paper to recheck the answers.

Sleep WellA sound sleep a night before exam helps us

relax and rejuvenates our mind. The tired brain needs and we need to understand the needs of our brain, only then we will be able to make the most out of it especially during examinations.

Relax YourselfThis is last but not the least. Relaxing is

like meditating. When we are relaxed we are the most efficient in reproducing what we have learnt.

The 'OSWAAL' Advantage?

Page 6: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

COMPUTER SCIENCE (THEORY) 2014-15Class XII (Theory) – Python

Duration : 3 Hours Total Marks : 70

Unit No. Unit Name Marks

1. OBJECT ORIENTED PROGRAMMING WITH PYTHON 24

2. ADVANCE PROGRAMMING WITH PYTHON 20

3. DATABASE MANAGEMENT SYSTEM AND SQL 8

4. BOOLEAN ALGEBRA 8

5. COMMUNICATION TECHNOLOGIES 10

70

UNIT 1 : OBJECT ORIENTED PROGRAMMING WITH PYTHON (50 Theory + 41 Practical) Periods

Review : Python covered in Class XIConcept of Object Oriented Programming : Data Hiding, Data Encapsulation, Class and object, polymorphism, inheritance, advantages of Object Oriented Programming over earlier programming methodologies.Classes : Defining classes (attributes, methods) creating instance objects, accessing attributes and methods, using built in class attributes (dict,doc,name,module,bases), constructor ( _ _init( )_ _), _ _del( )_ _ and _ _ str( )_ _ methods in a class, private attributes, importance of self, operator overloading with methods.Inheritance : Concept of base class and derived class, Single mutilevel and multiple inheritance_ overriding methods, using super( ) in derived class to invoke _ _int( )_ _ or overriden methods of parent class.

UNIT 2 : ADVANCE PROGRAMMING IN PYTHON (42 Thoery + 35 Practical) Periods

Linear List Manipulation : Sequential allocation and address calculation, traversal, insertion of an element in assorted list, deletion of an element from the list, searching (linear, binary), sorting (insertion, selection, bubble).Stacks (List implementation) : introduction to stack (LIFO operation), operations on stack (PUSH and POP) and its implementation in Python.Converting expressions from infix to postfix to postfix notation and evaluation of postfix expression.Queues (List implementation) : introduction to Queue (FIFO) operations on Queue (INSERT and DELETE) and its implementation in Python.Data File : Need for data file, types of data file— text and binary, Opening and closing files – open( ), close( ), file object, access modes (output, input, default), reading and writing a file read( ), readline ( ), readlines( ), write( ), file positions (seek( ), tell( )), renaming and deleting a file, writelines( ), flush( ).Implementation of basic file operations on text and binary file in Python : creating/writing data into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification of data in file.Errors and Exceptions— NameError, IndexError, TypeError, IOError, ImportError, ValueError, EOFError.Generation Function using yield

UNIT 3 : DATABASES AND SQL (20 Theory + 20 Practical) Periods

Database Concepts : Introduction to database concepts and its need.Relation data model : Concept of domain, tuple, relation, key, primary key, alternate key, candidate key;

[ v ]

Page 7: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

Relational algebra : Selection, Projection, Union and Cartesian product;Structured Query Language :General Concepts : Advantages of using SQL, Data Definition Language and Data Manipulation Language;Data Types : NUMBER/DECIMAL, CHARACTER/VARCHAR/VARCHAR2, DATE; SQL COMMANDS:CREATE TABLE, DROP TABLE, ALTER TABLE, UPDATE ....SET....., INSERT, DELETE; SELECT, DISTINCT, FROM, WHERE, IN, BETWEEN, GROUPBY, HAVING, ORDERBY; SQL functions : SUM, AVG, COUNT, MAX AND MIN;Obtaining results (SELECT query) from 2 tables using equi-join and Union.Note : Implementaiton of the above mentioned commands could be done on any SQL supported software on one or two tables.

UNIT 4 : BOOLEAN ALGEBRA (16 Theory + 0 Practical) PeriodsRole of Logical Operations in Computing.Binary-valued Quantities, Boolean Variable, Boolean Constant and Boolean Operators, AND, OR, NOT; Truth Tables : Closure, Property, Commutative Law, Associative Law, Identity Law, Principle of Duality, Idem potent Law, Distributive Law, Absorption Law, Involution Law, DeMorgan’s Law and their applications;Obtaining Sum of Product (SOP) and Product of Sum (POS) form from the Truth Table, Reducing BooleanExpression (SOP and POS) to its minimal form, Use of Karnaugh Map for minimization of Boolean expression (upto 4 variables);Application of Boolean Logic : Digital electronic circuit design using basic Logic Gates (NOT, AND, OR, NAND, NOR)Use of Boolean operators (AND, OR) in search engine queries.

UNIT 5 : COMMUNICATION TECHNOLOGIES (16 Theory + 0 Practical) PeriodsEvolution of Networking : ARPANET, Internet, InterspaceDifferent ways of sending data across the network with reference to switching techniques (Circuit and Packet switching);Data Communication terminologies : Concept of Channel, Bandwidth (Hz, KHz, MHz) and Data transfer rate (bps, kbps, Mbps, Tbps);Transmission media : Twisted pair cable, coaxial cable, optical fiber, infrared, radio link, microwave link and satellite link;Network devices : Modem, RJ45 connector, Ethernet Card, Router, Repeater, Switch, Gateway, wifi card;Network Topologies and types : Bus, Star, Tree, PAN, LAN, WAN, MAN:Network Protocol : TCP/IP, File Transfer Protocol (FTP), PPP, SMTP, POP3, Remote Login (Telnet), Internet Wireless/Mobile Communication protocol such as GSM, CDMA, GPRS, WLL,Mobile Telecommunication Technologies : 1G, 2G, 3G and 4GProtocols for Chat and Video Conferencing VOIPWireless technologies such as Wi-Fi and WiMaxNetwork Security Concepts : Threats and prevention from Viruses, Worms, Trojan horse, Spams Use of Cookies, Protection using Firewall;India IT Act, Cyber Law, Cyber Crimes, IPR issues, Hackings;Introduction To Web Services : WWW, Hyper Text Markup Language (HTML), Extensible Markup Language (XML); Hyper Text Transfer Protocol (HTTP); Domain Names; URL; Website, Web browser, Web Servers. Web Hosting, Web Scripting—Client side (VB Script, Java Script, PHP) and Server side (ASP, JSP, PHP), Web 2.0 (for social networking)

[ vi ]

Page 8: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

Class XII (Practicals) - PythonDuration : 3 Hours Total Marks : 30

1. Programming in Python 12

One programming problem in Python to be developed and tested in Computer during the examination. Marks are alloted on the basis of following :

Logic : 7 Marks

Documentation/Indentation : 2 Marks

Output presentation : 3 Marks

Notes : The types of problems to be given will be application type from the following topics

l String

l Lists/Tuples

l Dictionary

l File Operations

2. SQL Commands 05

Five Query questions based on a particular Table/Reaction to be tested practically on Computer during the examination. The command along with the result be written in the answer sheet.

3. A digital circuit design (after reduction using K-map) to give during the examination. The question must be written in the answer sheet 02

4. Project Work 05

The project has to be developed in Python language with Object Oriented Technology.

(The project is required to be developed in group of 2-4 students)

l Presentation on the computer

l Project report (Listing, Sample, Outputs, Documentation)

l Viva

5. Practical File 03 + 01*

Must have minimum 20 programs from the following topics

l List (general, stack, queue)

l Dictionary

l Tuple

l File Handling

l Programs based on Object Oriented Concepts

l 15 SQL commands along with the output based on any table/relation

6. Viva Voice 02

Viva will be asked from syllablus covered in class XII and the project developed by student.

[ vii ]

Page 9: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification
Page 10: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification

SAMPLE QUESTION PAPER–1(Solved)

Time 3 : 00 Hrs. ] [ M.M. : 70

1. (a) What are the advantages of the Python dictionary type? [2]

(b) Write the output for the following code : [2] x=10 y=20 if (x>y): print x+y else: print x–y

(c) Rectify the error (if any) in the given statements. [2]

>>> str=”Hello Python”

>>> str[6]=’S’

(d) Write a program to input any number and print all factors of that number. [2]

(e) What is the use of raise statement? Mention its syntax. [2]

(f) What all can be possible output of the following code : [2]

def myfunc (x=None): result=” ” if x is None: result= ”No argument given” elif x==0: result= ”Zero” elif 0<x<=3: result=”x is between 0 and 3” else: result=”x is more than 3” return result

2. (a) Define encapsulation with an example. [2]

(b) Predict the output of the following program. Also state which concept of OOP is being implemented? [2]

def sum(x,y,z):

print ”sum= ”, x+y+z

def sum(a,b):

print ”sum= ”, a+b

sum(10,20)

sum(10,20,30)

(c) Define a class TravelPlan in Python with the following descriptions : [4]

Private Members:

Plan Code of type long

Place of type character array (string)

Number_of_travellers of type integer

Number_of_buses of type integer

Page 11: Sample - KopyKitab into file, reading and displaying data from file, searching for particular data from a file, insertion and deletion of data from an already existing file, modification