[PDF] Computer Science Class-XII - CBSE Academic









[PDF] 1 Configuring a Computer I One Mark Question and Answer - KEA

Computer Science Questions and Answers UNIT-A Chapter - 1 Configuring a Computer I One Mark Question and Answer 1 Name the components of CPU
qb computer sc


[PDF] 4 Queue - NCERT

4 4 1 INTRODUCTION TO QUEUE In the previous chapter we learned about a data structure called Stack which works on Last-In- First-Out (LIFO) principle
lecs


[PDF] Computer Networks - NCERT

Chapter “Hoaxes use weaknesses in human COMPUTER SCIENCE - CLASS XII A computer network (Figure 10 2) is an interconnection
lecs


[PDF] 12th Computer Science Study Material HIMAYAM

XII- COMPUTER SCIENCE 4 Section-C Answer the following questions (3 Marks) The purpose of interfaces is to allow the computer to enforce the 
th Computer Science Study material





[PDF] Computer Science- An Overview (12th Global Edition)pdf

This book presents an introductory survey of computer science (Chapter 4); investigates the topics of algorithms programming languages and
Computer Science An Overview ( th Global Edition)


[PDF] COMPUTER SCIENCE Q No 1 Rohit a student of class 12th is

1 Rohit a student of class 12th is learning CSV File Module in Python Answer any four questions (out of five) from the below mentioned questions
ComputerScienceXII


[PDF] Computer Science Class-XII - CBSE Academic

Chapter IV A I am happy to release Computer Science Book for Class - XII 4 Sets: Set is unordered collection of values of any type with no 
Computer Science Python ClassXII


[PDF] 12th Computer Science Sura Guide Sample English Mediumpdf

answers are given in each chapter ☞ All the objective type (1 Mark) questions are given with 4 options (i) Choosing 
th computer science sura guide sample english medium





[PDF] Chapter-4 DATA STRUCTURES - WordPresscom

We can collect and store other Student's Record in a file or a database as a data structure ➢ Data Representation: Computer memory is used to store the 
chapter data structure


[PDF] COMPUTER SCIENCE SECOND YEAR PUC REVISED EDITION

IV Computer Science Syllabus Review and Textbook Development Committee Department of Pre-University Education Govt of Karnataka AUTHORS Rajappa
II PUC Computer


217239[PDF] Computer Science Class-XII - CBSE Academic

WITH PYTHON

CLASS -

XIIShiksha Kendra, 2, Community Centre, Preet Vihar, Delhi-110 092 India

Computer Science

Shiksha Kendra, 2, Community Centre, Preet Vihar, Delhi-110 092 India

COMPUTER

SCIENCE

Class-XII

Computer Science

Computer Science Class-XII

Price:

First Edition 2014, CBSE, India

Copies:

PUBLISHED BY :The Secretary, Central Board of Secondary Education

Shiksha Kendra, 2, Community Centre,

Preet Vihar, Delhi-110092

DESIGN, LAYOUT :Multi Graphics, 8A/101, W.E.A. Karol Bagh, New Delhi-110005, Phone: 011-25783846 COVER DESIGN :Ankit Barodiya, Air Force Golden Jubilee Institute,

Subroto Park, New Delhi

PRINTED BY :

No Part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or any means, electric, mechanical photocopying, recording or otherwise without the prior permission of the publisher.

Hkkjr dk lafo/ku

ewy dÙkZO; mísf'kdk 1

ge] Hkkjr ds yksx] Hkkjr dks ,d lEiw.kZ ¹izHkqRo&laiUu lektoknh iaFkfujis{k yksdra=kkRed x.kjkT;º cukus ds fy,] rFkk

mlds leLr ukxfjdksa dks% lkekftd] vkfFkZd vkSj jktuSfrd U;k;] fopkj] vfHkO;fDr] fo'okl] /eZ vkSj mikluk dh Lora=krk] izfr"Bk vkSj volj dh lerk izkIr djkus ds fy, rFkk mu lc esa O;fDr dh xfjek 2 vkSj ¹jk"Vª dh ,drk vkSj v[kaMrkº lqfuf'pr djus okyh ca/qrk c<+kus ds fy,

n`<+ladYi gksdj viuh bl lafo/ku lHkk esa vkt rkjh[k 26 uoEcj] 1949 bZñ dks ,rn~ }kjk bl lafo/ku dks vaxhÑr]

vf/fu;fer vkSj vkRekfiZr djrs gSaA

Hkkx 4 d

51 d- ewy dÙkZO; & Hkkjr ds izR;sd ukxfjd dk ;g dÙkZO; gksxk fd og &

(d) lafo/ku dk ikyu djs vkSj mlds vkn'kksZa] laLFkkvksa] jk"Vªèot vkSj jk"Vªxku dk vknj djs_

([k)Lora=krk ds fy, gekjs jk"Vªh; vkanksyu dks izsfjr djus okys mPp vkn'kksZa dks ân; esa latks, j[ks vkSj mudk ikyu djs_

(x)Hkkjr dh izHkqrk] ,drk vkSj v[kaMrk dh j{kk djs vkSj mls v{kq..k j[ks_ (?k)ns'k dh j{kk djs vkSj vkg~oku fd, tkus ij jk"Vª dh lsok djs_

(Ä)Hkkjr ds lHkh yksxksa esa lejlrk vkSj leku Hkzkr`Ro dh Hkkouk dk fuekZ.k djs tks /eZ] Hkk"kk vkSj izns'k ;k oxZ ij vk/kfjr lHkh

HksnHkko ls ijs gksa] ,slh izFkkvksa dk R;kx djs tks fL=k;ksa ds lEeku ds fo#¼ gSa_

(p)gekjh lkekfld laLÑfr dh xkSjo'kkyh ijaijk dk egÙo le>s vkSj mldk ifjj{k.k djs_

(N)izkÑfrd i;kZoj.k dh ftlds varxZr ou] >hy] unh] vkSj oU; tho gSa] j{kk djs vkSj mldk lao/Zu djs rFkk izkf.kek=k ds izfr

n;kHkko j[ks_ (t)oSKkfud n`f"Vdks.k] ekuookn vkSj KkuktZu rFkk lq/kj dh Hkkouk dk fodkl djs_ (>)lkoZtfud laifÙk dks lqjf{kr j[ks vkSj fgalk ls nwj jgs_

(×k)O;fDrxr vkSj lkewfgd xfrfof/;ksa ds lHkh {ks=kksa esa mRd"kZ dh vksj c<+us dk lrr iz;kl djs ftlls jk"Vª fujarj c<+rs gq, iz;Ru

vkSj miyfC/ dh ubZ mapkb;ksa dks Nw ys_ 1

(V);fn ekrk&firk ;k laj{kd gS] Ng o"kZ ls pkSng o"kZ rd dh vk;q okys vius] ;FkkfLFkfr] ckyd ;k izfrikY; ds fy;s f'k{kk ds

volj iznku djsA

1- lafo/ku (N;klhoka la'kks/u) vf/fu;e] 2002 dh /kjk 4 }kjk (12-12-2002) lsa var% LFkkfirA

THE CONSTITUTION OF INDIA

PREAMBLE

1

WE, THE PEOPLE OF INDIA,

having solemnly resolved to constitute India into a [SOVEREIGN SOCIALIST SECULAR DEMOCRATIC REPUBLIC] and to secure to all its citizens :

JUSTICE, social, economic and political;

LIBERTY of thought, expression, belief, faith and worship; EQUALITY of status and of opportunity; and to promote among them all 2

FRATERNITY

assuring the dignity of the individual and the [unity and integrity of the Nation]; IN OUR CONSTITUENT ASSEMBLY this twenty-sixth day of November, 1949, do HEREBY ADOPT,

ENACT AND GIVE TO OURSELVES THIS CONSTITUTION.

THE CONSTITUTION OF INDIA

Chapter IV A

FUNDAMENTAL DUTIES

ARTICLE 51A

Fundamental Duties - It shall be the duty of every citizen of India-

(a) to abide by the Constitution and respect its ideals and institutions, the National Flag and the National

Anthem;

(b) to cherish and follow the noble ideals which inspired our national struggle for freedom; (c) to uphold and protect the sovereignty, unity and integrity of India; (d) to defend the country and render national service when called upon to do so;

(e) to promote harmony and the spirit of common brotherhood amongst all the people of India transcending

religious, linguistic and regional or sectional diversities; to renounce practices derogatory to the dignity of

women; (f) to value and preserve the rich heritage of our composite culture;

(g) to protect and improve the natural environment including forests, lakes, rivers, wild life and to have

compassion for living creatures; (h) to develop the scientific temper, humanism and the spirit of inquiry and reform; (i) to safeguard public property and to abjure violence;

(j) to strive towards excellence in all spheres of individual and collective activity so that the nation constantly

rises to higher levels of endeavour and achievement; 1

(k) who is a parent or guardian to provide opportunities for education to his/her child or, as the case may be,

ward between age of six and forteen years.

1. Subs, by the Constitution (Forty-Second Amendment) Act. 1976, sec. 2, for "Sovereign Democratic Republic" (w.e.f. 3.1.1977)

2. Subs, by the Constitution (Forty-Second Amendment) Act. 1976, sec. 2, for "unity of the Nation" (w.e.f. 3.1.1977)

1. Ins. by the constitution (Eighty - Sixth Amendment) Act, 2002 S.4 (w.e.f. 12.12.2002)

Computer Science

Foreword

This century is characterized with the emergence of knowledge based society wherein ICT plays a

pivotal role. In its vision, the National Policy on ICT in School Education by MHRD, Govt. of India,

states "The ICT Policy in School Education aims at preparing youth to participate creatively in the establishment, sustenance and growth of a knowledge society leading to all round socio economic development of the nation and global competitiveness". The policy envisa ges three stages of ICT implementations at school level - ICT literacy and Competency Enhancement, IT enabled teaching- learning, and introduction of ICT related elective subjects at Senior Secondary level. With this backdrop a major paradigm shift is imperative in imparting ICT- enabled instructions, collaborative learning, multidisciplinary problem-solving and promoting critical thinking skills as envisaged in the National curriculum framework 2005. Foundation of these skills is laid at school level. Ever since the invention of Charles Babbage's difference engine in 1822, computers have required a means of instructing them to perform a specific task. This is known as a programming language. Programs in computer programming language prepare people to write and design computer software. Computer languages were first composed of a series of steps to wire a particular program; these morphed into a series of steps keyed into the computer and then executed; later these languages acquired advanced features such as logical branching and object orientation. Syllabus of Computer Sciences has been revisited accordingly with a focus on generic concepts with domain specific practical experiments and projects to ensure conceptual knowledge with

practical skills. Learning to write programs stretches your mind, and helps you think better, creates

a way of thinking about things that is helpful in all domains. Since Computers have permeated in every walk of life such as launching of satellites, e-trading, e-business and social networking therefore it is imperative to study programming languages. I am happy to release Computer Science Book for Class - XII. I would like to express my deep appreciation to the text book development team for their contribution. Appreciation is also due to Dr. Sadhana Parashar, Prof. & Director (Academics, Research, Training and Innovation) and Dr. Kshipra Verma, Education Officer, CBSE in bringing out this publication.

It is hoped that all students and teachers will benefit by making best use of this publication. Their

feedback will be highly appreciated for further improvement.

Vineet Joshi

Chairman, CBSE

Computer Science

Acknowledgements

CBSE ADVISORS

v v

DEVELOPMENT TEAM

v v v v v

CHIEF EDITOR & MEMBER COORDINATOR

v

Shri Vineet Joshi, Chairman, CBSE

Dr. Sadhana Parashar, Prof. & Director

(Academics, Research, Training and Innovation) Ms. Anju Gupta, Rukmini Devi Public School, Pitam Pura, New Delhi. Ms. Mohini Arora, Air Force Golden Jubilee Institute, Subroto Park, New

Delhi.

Ms. S. Meena, Sachdeva Public School, Pitam Pura, New Delhi.

Ms. Shally Arora, Delhi Public School, Gurgaon.

Ms. Kshipra Verma, Education Officer, CBSE, New Delhi. Ms. Kshipra Verma, Education Officer, CBSE, New Delhi.

Computer Science

Content

Unit-1: Review of Phython & Concept of Oops1

Unit-2: Advanced Programming with Python87

Unit-3: Databases Management Systems and SQL159

Unit-4: Introduction to Boolean Algebra203

Unit-5: Communication Technologies259

Chapter_1 Review of Phython2

Chapter_2 Concept of Object Oriented Programming28

Chapter_3 Classes in Python39

Chapter_4 Inheritance66

Chapter_1 Liner List Manipulation88

Chapter_2 Stacks & Queues in list 106

Chapter_3 Data File Handling 124

Chapter_4 Exception Handling & Generate Functions 147

Chapter_1 Databases Concepts and SQL160

Chapter_2 Structure Query Language176

Chapter_1 Boolean Algebra204

Chapter_2 Boolean Functions and Reduce Forms220

Chapter_3 Application of Boolean Logic239

Chapter_1 Networking Concepts Part I260

Chapter_2 Networking Concepts Part II271

Chapter_3 Networking Protocols290

Chapter_4 Mobile Telecommunication

Technologies, Network Security

and Internet Services299

Computer Science

Computer Science

Unit-1: Review of Python

& Concept of Oops

Computer Science

Learning Objectives:

2 2 2 2 2 2 2

WITH PYTHON

CLASS -

XIIShiksha Kendra, 2, Community Centre, Preet Vihar, Delhi-110 092 India

Computer Science

Shiksha Kendra, 2, Community Centre, Preet Vihar, Delhi-110 092 India

COMPUTER

SCIENCE

Class-XII

Computer Science

Computer Science Class-XII

Price:

First Edition 2014, CBSE, India

Copies:

PUBLISHED BY :The Secretary, Central Board of Secondary Education

Shiksha Kendra, 2, Community Centre,

Preet Vihar, Delhi-110092

DESIGN, LAYOUT :Multi Graphics, 8A/101, W.E.A. Karol Bagh, New Delhi-110005, Phone: 011-25783846 COVER DESIGN :Ankit Barodiya, Air Force Golden Jubilee Institute,

Subroto Park, New Delhi

PRINTED BY :

No Part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or any means, electric, mechanical photocopying, recording or otherwise without the prior permission of the publisher.

Hkkjr dk lafo/ku

ewy dÙkZO; mísf'kdk 1

ge] Hkkjr ds yksx] Hkkjr dks ,d lEiw.kZ ¹izHkqRo&laiUu lektoknh iaFkfujis{k yksdra=kkRed x.kjkT;º cukus ds fy,] rFkk

mlds leLr ukxfjdksa dks% lkekftd] vkfFkZd vkSj jktuSfrd U;k;] fopkj] vfHkO;fDr] fo'okl] /eZ vkSj mikluk dh Lora=krk] izfr"Bk vkSj volj dh lerk izkIr djkus ds fy, rFkk mu lc esa O;fDr dh xfjek 2 vkSj ¹jk"Vª dh ,drk vkSj v[kaMrkº lqfuf'pr djus okyh ca/qrk c<+kus ds fy,

n`<+ladYi gksdj viuh bl lafo/ku lHkk esa vkt rkjh[k 26 uoEcj] 1949 bZñ dks ,rn~ }kjk bl lafo/ku dks vaxhÑr]

vf/fu;fer vkSj vkRekfiZr djrs gSaA

Hkkx 4 d

51 d- ewy dÙkZO; & Hkkjr ds izR;sd ukxfjd dk ;g dÙkZO; gksxk fd og &

(d) lafo/ku dk ikyu djs vkSj mlds vkn'kksZa] laLFkkvksa] jk"Vªèot vkSj jk"Vªxku dk vknj djs_

([k)Lora=krk ds fy, gekjs jk"Vªh; vkanksyu dks izsfjr djus okys mPp vkn'kksZa dks ân; esa latks, j[ks vkSj mudk ikyu djs_

(x)Hkkjr dh izHkqrk] ,drk vkSj v[kaMrk dh j{kk djs vkSj mls v{kq..k j[ks_ (?k)ns'k dh j{kk djs vkSj vkg~oku fd, tkus ij jk"Vª dh lsok djs_

(Ä)Hkkjr ds lHkh yksxksa esa lejlrk vkSj leku Hkzkr`Ro dh Hkkouk dk fuekZ.k djs tks /eZ] Hkk"kk vkSj izns'k ;k oxZ ij vk/kfjr lHkh

HksnHkko ls ijs gksa] ,slh izFkkvksa dk R;kx djs tks fL=k;ksa ds lEeku ds fo#¼ gSa_

(p)gekjh lkekfld laLÑfr dh xkSjo'kkyh ijaijk dk egÙo le>s vkSj mldk ifjj{k.k djs_

(N)izkÑfrd i;kZoj.k dh ftlds varxZr ou] >hy] unh] vkSj oU; tho gSa] j{kk djs vkSj mldk lao/Zu djs rFkk izkf.kek=k ds izfr

n;kHkko j[ks_ (t)oSKkfud n`f"Vdks.k] ekuookn vkSj KkuktZu rFkk lq/kj dh Hkkouk dk fodkl djs_ (>)lkoZtfud laifÙk dks lqjf{kr j[ks vkSj fgalk ls nwj jgs_

(×k)O;fDrxr vkSj lkewfgd xfrfof/;ksa ds lHkh {ks=kksa esa mRd"kZ dh vksj c<+us dk lrr iz;kl djs ftlls jk"Vª fujarj c<+rs gq, iz;Ru

vkSj miyfC/ dh ubZ mapkb;ksa dks Nw ys_ 1

(V);fn ekrk&firk ;k laj{kd gS] Ng o"kZ ls pkSng o"kZ rd dh vk;q okys vius] ;FkkfLFkfr] ckyd ;k izfrikY; ds fy;s f'k{kk ds

volj iznku djsA

1- lafo/ku (N;klhoka la'kks/u) vf/fu;e] 2002 dh /kjk 4 }kjk (12-12-2002) lsa var% LFkkfirA

THE CONSTITUTION OF INDIA

PREAMBLE

1

WE, THE PEOPLE OF INDIA,

having solemnly resolved to constitute India into a [SOVEREIGN SOCIALIST SECULAR DEMOCRATIC REPUBLIC] and to secure to all its citizens :

JUSTICE, social, economic and political;

LIBERTY of thought, expression, belief, faith and worship; EQUALITY of status and of opportunity; and to promote among them all 2

FRATERNITY

assuring the dignity of the individual and the [unity and integrity of the Nation]; IN OUR CONSTITUENT ASSEMBLY this twenty-sixth day of November, 1949, do HEREBY ADOPT,

ENACT AND GIVE TO OURSELVES THIS CONSTITUTION.

THE CONSTITUTION OF INDIA

Chapter IV A

FUNDAMENTAL DUTIES

ARTICLE 51A

Fundamental Duties - It shall be the duty of every citizen of India-

(a) to abide by the Constitution and respect its ideals and institutions, the National Flag and the National

Anthem;

(b) to cherish and follow the noble ideals which inspired our national struggle for freedom; (c) to uphold and protect the sovereignty, unity and integrity of India; (d) to defend the country and render national service when called upon to do so;

(e) to promote harmony and the spirit of common brotherhood amongst all the people of India transcending

religious, linguistic and regional or sectional diversities; to renounce practices derogatory to the dignity of

women; (f) to value and preserve the rich heritage of our composite culture;

(g) to protect and improve the natural environment including forests, lakes, rivers, wild life and to have

compassion for living creatures; (h) to develop the scientific temper, humanism and the spirit of inquiry and reform; (i) to safeguard public property and to abjure violence;

(j) to strive towards excellence in all spheres of individual and collective activity so that the nation constantly

rises to higher levels of endeavour and achievement; 1

(k) who is a parent or guardian to provide opportunities for education to his/her child or, as the case may be,

ward between age of six and forteen years.

1. Subs, by the Constitution (Forty-Second Amendment) Act. 1976, sec. 2, for "Sovereign Democratic Republic" (w.e.f. 3.1.1977)

2. Subs, by the Constitution (Forty-Second Amendment) Act. 1976, sec. 2, for "unity of the Nation" (w.e.f. 3.1.1977)

1. Ins. by the constitution (Eighty - Sixth Amendment) Act, 2002 S.4 (w.e.f. 12.12.2002)

Computer Science

Foreword

This century is characterized with the emergence of knowledge based society wherein ICT plays a

pivotal role. In its vision, the National Policy on ICT in School Education by MHRD, Govt. of India,

states "The ICT Policy in School Education aims at preparing youth to participate creatively in the establishment, sustenance and growth of a knowledge society leading to all round socio economic development of the nation and global competitiveness". The policy envisa ges three stages of ICT implementations at school level - ICT literacy and Competency Enhancement, IT enabled teaching- learning, and introduction of ICT related elective subjects at Senior Secondary level. With this backdrop a major paradigm shift is imperative in imparting ICT- enabled instructions, collaborative learning, multidisciplinary problem-solving and promoting critical thinking skills as envisaged in the National curriculum framework 2005. Foundation of these skills is laid at school level. Ever since the invention of Charles Babbage's difference engine in 1822, computers have required a means of instructing them to perform a specific task. This is known as a programming language. Programs in computer programming language prepare people to write and design computer software. Computer languages were first composed of a series of steps to wire a particular program; these morphed into a series of steps keyed into the computer and then executed; later these languages acquired advanced features such as logical branching and object orientation. Syllabus of Computer Sciences has been revisited accordingly with a focus on generic concepts with domain specific practical experiments and projects to ensure conceptual knowledge with

practical skills. Learning to write programs stretches your mind, and helps you think better, creates

a way of thinking about things that is helpful in all domains. Since Computers have permeated in every walk of life such as launching of satellites, e-trading, e-business and social networking therefore it is imperative to study programming languages. I am happy to release Computer Science Book for Class - XII. I would like to express my deep appreciation to the text book development team for their contribution. Appreciation is also due to Dr. Sadhana Parashar, Prof. & Director (Academics, Research, Training and Innovation) and Dr. Kshipra Verma, Education Officer, CBSE in bringing out this publication.

It is hoped that all students and teachers will benefit by making best use of this publication. Their

feedback will be highly appreciated for further improvement.

Vineet Joshi

Chairman, CBSE

Computer Science

Acknowledgements

CBSE ADVISORS

v v

DEVELOPMENT TEAM

v v v v v

CHIEF EDITOR & MEMBER COORDINATOR

v

Shri Vineet Joshi, Chairman, CBSE

Dr. Sadhana Parashar, Prof. & Director

(Academics, Research, Training and Innovation) Ms. Anju Gupta, Rukmini Devi Public School, Pitam Pura, New Delhi. Ms. Mohini Arora, Air Force Golden Jubilee Institute, Subroto Park, New

Delhi.

Ms. S. Meena, Sachdeva Public School, Pitam Pura, New Delhi.

Ms. Shally Arora, Delhi Public School, Gurgaon.

Ms. Kshipra Verma, Education Officer, CBSE, New Delhi. Ms. Kshipra Verma, Education Officer, CBSE, New Delhi.

Computer Science

Content

Unit-1: Review of Phython & Concept of Oops1

Unit-2: Advanced Programming with Python87

Unit-3: Databases Management Systems and SQL159

Unit-4: Introduction to Boolean Algebra203

Unit-5: Communication Technologies259

Chapter_1 Review of Phython2

Chapter_2 Concept of Object Oriented Programming28

Chapter_3 Classes in Python39

Chapter_4 Inheritance66

Chapter_1 Liner List Manipulation88

Chapter_2 Stacks & Queues in list 106

Chapter_3 Data File Handling 124

Chapter_4 Exception Handling & Generate Functions 147

Chapter_1 Databases Concepts and SQL160

Chapter_2 Structure Query Language176

Chapter_1 Boolean Algebra204

Chapter_2 Boolean Functions and Reduce Forms220

Chapter_3 Application of Boolean Logic239

Chapter_1 Networking Concepts Part I260

Chapter_2 Networking Concepts Part II271

Chapter_3 Networking Protocols290

Chapter_4 Mobile Telecommunication

Technologies, Network Security

and Internet Services299

Computer Science

Computer Science

Unit-1: Review of Python

& Concept of Oops

Computer Science

Learning Objectives:

2 2 2 2 2 2 2