Computer

Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

NAVY CHILDREN SCHOOL

Split Up Syllabus (2022-23)


Class –XI Computer Science (083)

1. Pre-requisites: Basic handling of computer system.

2. Learning Outcomes: Student should be able to


• develop basic computational thinking
• explain and use data types
• appreciate the notion of algorithm
• develop a basic understanding of computer systems - architecture, operating
system and cloud computing
• explain cyber ethics, cyber safety and cybercrime
• Understand the value of technology in societies along with consideration of
gender and disability issues
3. Distribution of Marks:

4. Monthly Split up syllabus:


TERM-I
Month Chapter Content/Practical/Assignment
April/May 1. Computer Systems • Basic Computer Organisation: Introduction to
computer system, hardware,software, input
and Organisation
device, output device, CPU, memory (primary,
cache and secondary), units of memory (Bit,
Byte, KB, MB, GB, TB, PB)
• Types of software: system software (operating
systems, system utilities, device drivers),
programming tools and language translators
(assembler, compiler & interpreter), application
software
• Operating system (OS): functions of operating
system, OS user interface
2. Boolean Logic
• Boolean logic: NOT, AND, OR, NAND, NOR,
XOR, truth table, De Morgan’s laws and logic
3. Number System circuits
• Number system: Binary, Octal, Decimal and
Hexadecimal number system; conversion
4. Encoding between number systems.
Schemes • Encoding schemes: ASCII, ISCII and UNICODE
(UTF8, UTF32)
June/ July 5. Introduction to • Steps for problem solving (analysing the problem,
developing an algorithm, coding, testing and
problem solving
debugging). representation of algorithms using
flow chart and pseudo code, decomposition.
6. Getting Started • Familiarization with the basics of Python
programming: Introduction to Python, features of
with Python Python, executing a simple "hello world"
program, execution modes: interactive mode and
script mode, Python character set, Python tokens
(keyword, identifier, literal, operator, punctuator),
variables, concept of l-value and r-value, use of
comments.
7. Python • Knowledge of data types: number (integer,
floating point, complex), boolean, sequence
Fundamentals & (string, list, tuple), none, mapping (dictionary),
Data Handling mutable and immutable data types
• Operators: arithmetic operators, relational
operators, logical operators, assignment
operator, augmented assignment operators,
identity operators(is, is not), membership
operators(in, not in)
August 8. Python • Expressions, statement, type conversion &
input/output: precedence of operators,
Expressions &
expression, evaluation of expression, python
Statements statement, type conversion (explicit & implicit
conversion), accepting data as input from the
console and displaying output
9. Errors & • Errors: syntax errors, logical errors, runtime
Debugging errors
10. Flow of control: • Flow of control: introduction, use of indentation,
sequential & sequential flow, conditional and iterative flow
conditional flow control
• Conditional statements: if, if-else, if-elif-else,
flowcharts, simple programs: e.g.: absolute value,
sort 3 numbers and divisibility of a number
Sept 11. Flow of control: • Iterative statements: for loop, range function,
while loop, flowcharts, break and continue
Loops
statements, nested loops, suggested programs:
generating pattern, summation of series, finding
the factorial of a positive number etc
12. Strings in Python
• Strings: introduction, indexing, string operations
(concatenation, repetition, membership & slicing),
traversing a string using loops, built-in functions:
len(), capitalize(), title(), lower(), upper(), count(),
find(), index(), endswith(), startswith(), isalnum(),
isalpha(), isdigit(), islower(), isupper(), isspace(),
lstrip(), rstrip(), strip(), replace(), join(), partition(),
split()
Oct Revision/ Term-1 Final • Revision of all topics of Term-1 syllabus
Examination

TERM-II
Nov- 13. Lists • Lists: introduction, indexing, list operations (concatenation,
Dec repetition, membership & slicing), traversing a list using
loops, built-in functions: len(), list(), append(), extend(),
insert(), count(), index(), remove(), pop(), reverse(), sort(),
sorted(), min(), max(), sum(); nested lists, suggested
programs: finding the maximum, minimum, mean of numeric
values stored in a list; linear search on list of numbers and
counting the frequency of elements in a list
Jan 14. Tuples • Tuples: introduction, indexing, tuple operations
(concatenation, repetition, membership & slicing), built-in
functions: len(), tuple(), count(), index(), sorted(), min(),
max(), sum(); tuple assignment, nested tuple, suggested
programs: finding the minimum, maximum, mean of values
stored in a tuple; linear search on a tuple of numbers,
counting the frequency of elements in a tuple
15. Dictionary
• Dictionary: introduction, accessing items in a dictionary
using keys, mutability of dictionary (adding a new item,
modifying an existing item), traversing a dictionary, built-in
functions: len(), dict(), keys(), values(), items(), get(),
update(), del(), clear(), fromkeys(), copy(), pop(), popitem(),
setdefault(), max(), min(), count(), sorted(), copy();
suggested programs : count the number of times a
character appears in a given string using a dictionary,
create a dictionary with names of employees, their salary
and access them
Feb 16. Intro to • Introduction to Python modules: Importing module using
Python 'import ' and using from statement, Importing math module
(pi, e,sqrt, ceil, floor, pow, fabs, sin, cos, tan); random
Modules
module (random, randint, randrange), statistics module
(mean, median, mode)
• Digital Footprints ● Digital society and Netizen: net
17. Society, etiquettes, communication etiquettes, social media
etiquettes ● Data protection: Intellectual Property Right
Laws and
(copyright, patent, trademark), violation of IPR (plagiarism,
Ethics copyright infringement, trademark infringement), open
source softwares and licensing (Creative Commons, GPL
and Apache) ● Cyber-crime: definition, hacking,
eavesdropping, phishing and fraud emails, ransomware,
preventing cyber crime ● Cyber safety: safely browsing the
web, identity protection, confidentiality, cyber trolls and
bullying. ● Safely accessing web sites: malware, viruses,
Trojans, adware ● E-waste management: proper disposal of
used electronic gadgets ● Indian Information Technology
Act (IT Act) ● Technology & Society: Gender and disability
issues while teaching and using computers.
March Revision / Term- • Revision of all topics of Term-2 syllabus
2 Final Exam

5. Blue Print: As per the CBSE SQP to be released by CBSE on its website in due
course of time.
6. Practical Work: As per the CBSE list of suggested Practical for the Academic
Year 2022-23.
7. Worksheets: Term-I and Term-II worksheets appended below with suggested
answer key.

8. Sample QP/ Blueprint: Term-I and Term-II Sample Question Papers appended
below. QP to be set as per the CBSE SQP to be released by CBSE on its website in
due course of time.
NAVY CHILDREN SCHOOL

CHAPTER: COMPUTER OVERVIEW

WORKSHEET

Time: 40 Min Max Marks: 20

1. MSI stands for

a. Medium Scale Integrated Circuits b. Medium System Integrated Circuits

c. Medium Scale Intelligent Circuit d. Medium System Intelligent Circuit

2. The capacity of 3.5 inch floppy disk is

a. 1.40 MB b. 1.44 GB c. 1.40 GB d. 1.44 MB

3. EBCDIC stands for

a. Extended Binary Coded Decimal Interchange Code

b. Extended Bit Code Decimal Interchange Code

c. Extended Bit Case Decimal Interchange Code

d. Extended Binary Case Decimal Interchange Code

4. Which of the following is a part of the Central Processing Unit?

a. Printer b. Key board

c. Mouse d. Arithmetic & Logic unit

5. Where are data and programme stored when the processor uses them?

a. Main memory b. Secondary memory

c. Disk memory d. Programme memory

6. . ............... represents raw facts, where-as................. is data made meaningful.

a. Information, reporting b. Data, information

c. Information, bits d. Records, bytes

7. Which programming languages are classified as low level languages?

a. BASIC, COBOL, Fortran b. Prolog

c. C, C++ d. Assembly languages


8. Which of the following is a storage device?

a. Tape b. Hard Disk

c. Floppy Disk d. All of the above

9. A normal CD- ROM usually can store up to _________ _data?

a. 680 KB b. 680 Bytes

c. 680 MB d. 680 GB

10 What is a light pen?

a. Mechanical Input device b. Optical input device

c. Electronic input device d. Optical output device

11. ASCII stands for

a. American Stable Code for International Interchange

b. American Standard Case for Institutional Interchange

c. American Standard Code for Information Interchange

d. American Standard Code for Interchange Information

12. The computer size was very large in

a. First Generation b. Second Generation

c. Third Generation d. Fourth Generation

13. The output quality of a printer is measured by

a. Dot per inch b. Dot per sq. inch

c. Dots printed per unit time d. All of above


14. Human beings are referred to as Homosapinens, which device is called Sillico
Sapiens?

a. Monitor b. Hardware

c. Robot d. Computer

15. Which of the following are input devices?

a. Keyboard b. Mouse c. Card reader d. Any of these

16. 1 Byte =?

a. 8 bits b. 4 bits c. 2 bits d. 9 bits

17. SMPS stands for

a. Switched mode Power Supply b. Start mode power supply

c. Store mode power supply d. Single mode power supply

18. BIOS stands for


a. Basic Input Output system b. Binary Input output system
c. Basic Input Off system d. all the above

19. Data becomes ................ when it is presented in a format that people can
understand and use

a. Processed b. Graphs c. Information d. Presentation

20. Which of the following are the functions of a operating system

a. Allocates resources b. Monitors Activities

c. Manages disks and files d. All of the above


NAVY CHILDREN SCHOOL

CHAPTER: DATA REPRESENTATION

WORKSHEET

Time: 40 Min Max Marks: 20

1 ASCII code is a ……… bit code.

a) 1 b) 2 c) 7 d) 8

2 8421 codes is also called as.

a) Gray code b) ASCII code c) excess 3-code d) BCD code

3 The binary system, 1+1=…………

(a) 2 (b) 0 (c) 1 (d) none of these

4 110+110=…………

(a) 2 (b) 0 (c) 1 (d) none of these

5 The digital system usually operated on ………system.

(a) binary (b) decimal (c)octal (d) hexadecimal

6 The binary system use powers of……….for positional values.

(a) 2 (b)10 (c) 8 (d)16

7 After counting 0, 1, 10, 11, the next binary number is

(a) 12 (b) 100 (c)101 (d) 110

8. The 2’s complement of 10002 is

(a)0111 (b)0101 (c) 1000 (d)0001

9. 110100112= ?16

a) D316 b) A316 c) B316 d) D216

10 25?10= ?2__________

a) 100012 b) 110012 c) 110002 d) 101012


NAVY CHILDREN SCHOOL

CHAPTER : BOOLEAN ALGEBRA

WORKSHEET

Time: 40 Min Max Marks: 20

1 In logic algebra, variables can assume only two values:either……….or 1.


(a) 2 (b) 0 (c) 3 (d) 4
2 The………. gate is also called any-or-all gate.
(a) OR (b) AND (c) NOT (d) EX-OR
3 A logic gate is an electronic circuit which
(a) makes logic decisions (b) allows electron flow only in one direction
(c) works on binary algebra (d) alternates between 0&1 values
4. In positive logic, logic gate 1 corresponds to
(a) positive voltage (b) higher voltage level
(c) zero voltage level (d) lower voltage level
5. In negative logic, the logic state 1 corresponds to
(a) negative logic (b) zero voltage
(c) more negative voltage (d) lower voltage level
6. The output of a 2-input OR the gate is 0 only when it’s
(a) both inputs are 0 (b) either input is 1
(c) both inputs are 1 (d) either input is 0
7. In Boolean algebra , A+ A= -----------
a)A b)1 c)0 d)None of these
8. In Boolean algebra , A . A=-----------
a) A2 b) A c)2A d)1
9. In Boolean algebra A+ AB =-----------
a) B b) A c)AB d)A+B
10. When an input electrical signal A=10100 is applied to a NOT gate, it’s output
Signal is
(a) 01011 (b) 10101 (c) 10100 (d)00101
NAVY CHILDREN SCHOOL

CHAPTER: GETTING STARTED WITH PYTHON

WORKSHEET

Time: 40 Min Max Marks: 20

1. Is Python case sensitive when dealing with identifiers?

a) yes

b) no

c) machine dependent

d) none of the mentioned

2. What is the maximum possible length of an identifier?

a) 31 characters

b) 63 characters

c) 79 characters

d) none of the mentioned

3. Which of the following is invalid?

a) _a = 1

b) __a = 1

c) __str__ = 1

d) none of the mentioned

4. Which of the following is an invalid variable?

a) my_string_1

b) 1st_string

c) foo

d) _
5. Why are local variable names beginning with an underscore discouraged?

a) they are used to indicate a private variables of a class

b) they confuse the interpreter

c) they are used to indicate global variables

d) they slow down execution

6. Which of the following is not a keyword?

a) eval

b) assert

c) nonlocal

d) pass

7. All keywords in Python are in

a) lower case

b) UPPER CASE

c) Capitalized

d) None of the mentioned

8. Which of the following is true for variable names in Python?

a) unlimited length

b) all private members must have leading and trailing underscores

c) underscore and ampersand are the only two special characters allowed

d) none of the mentioned

9. Which of the following is an invalid statement?

a) abc = 1,000,000
b) a b c = 1000 2000 3000

c) a,b,c = 1000, 2000, 3000

d) a_b_c = 1,000,000

10. Which of the following cannot be a variable?

a) __init__

b) in

c) it

d) on
NAVY CHILDREN SCHOOL

CHAPTER : PYTHON FUNDAMENTALS

WORKSHEET

Time: 40 Min Max Marks: 20

1. Which is the correct operator for power(xy)?


a) X^y
b) X**y
c) X^^y
d) None of the mentioned

2. Which one of these is floor division?


a) /
b) //
c) %
d) None of the mentioned

3. What is the order of precedence in python?


i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Addition
vi) Subtraction
a) i,ii,iii,iv,v,vi
b) ii,i,iii,iv,v,vi
c) ii,i,iv,iii,v,vi
d) i,ii,iii,iv,vi,v

4. What is answer of this expression, 22 % 3 is?


a) 7
b) 1
c) 0
d) 5
5. Mathematical operations can be performed on a string. State whether true or
false.
a) True
b) False

6. Operators with the same precedence are evaluated in which manner?


a) Left to Right
b) Right to Left
c) Can’t say
d) None of the mentioned

7. What is the output of this expression, 3*1**3?


a) 27
b) 9
c) 3
d) 1

8. Which one of the following have the same precedence?


a) Addition and Subtraction
b) Multiplication and Division
c) Both Addition and Subtraction AND Multiplication and Division
d) None of the mentioned

9. The expression Int(x) implies that the variable x is converted to integer. State
whether true or false.
a) True
b) False

10. Which one of the following have the highest precedence in the expression?
a) Exponential
b) Addition
c) Multiplication
d) Parentheses
NAVY CHILDREN SCHOOL

CHAPTER : DATA HANDLING

WORKSHEET

Time: 40 Min Max Marks: 20

1. Which of these in not a core data type?


a) Lists
b) Dictionary
c) Tuples
d) Class

2. Given a function that does not return any value, What value is thrown by default
when executed in shell.

a) int

b) bool

c) void

d) None

3. Following set of commands are executed in shell, what will be the output?

>>>str="hello"

>>>str[:2]

>>>

a) he

b) lo

c) olleh

d) hello

4. Which of the following will run without errors ?

a) round(45.8)

b) round(6352.898,2,5)

c) round()

d) round(7463.123,2,1)
5. What is the return type of function id ?

a) int

b) float

c) bool

d) dict

6. In python we do not specify types,it is directly interpreted by the compiler, so


consider the following operation to be performed.

>>>x = 13 ? 2

objective is to make sure x has a integer value, select all that apply (python 3.xx)

a) x = 13 // 2

b) x = int(13 / 2)

c) x = 13 % 2

d) All of the mentioned

7. What error occurs when you execute?

apple = mango

a) SyntaxError

b) NameError

c) ValueError

d) TypeError

8. Carefully observe the code and give the answer.

def example(a):

a = a + '2'

a = a*2

return a

>>>example("hello")
a) indentation Error

b) cannot perform mathematical operation on strings

c) hello2

d) hello2hello2

9. What data type is the object below ?

L = [1, 23, ‘hello’, 1].

a) list

b) dictionary

c) array

d) tuple

10. In order to store values in terms of key and value we use what core data type.

a) list

b) tuple

c) class

d) dictionary

11. Which of the following results in a SyntaxError ?

a) ‘”Once upon a time…”, she said.’

b) “He said, ‘Yes!'”

c) ‘3\’

d) ”’That’s okay”’

12. What is the average value of the code that is executed below ?

>>>grade1 = 80

>>>grade2 = 90

>>>average = (grade1 + grade2) / 2


a) 85

b) 85.1

c) 95

d) 95.1

13. Select all options that print

hello-how-are-you

a) print(‘hello’, ‘how’, ‘are’, ‘you’)

b) print(‘hello’, ‘how’, ‘are’, ‘you’ + ‘-‘ * 4)

c) print(‘hello-‘ + ‘how-are-you’)

d) print(‘hello’ + ‘-‘ + ‘how’ + ‘-‘ + ‘are’ + ‘you’)

14. What is the return value of trunc() ?

a) int

b) bool

c) float

d) None

15. What is the output of print 0.1 + 0.2 == 0.3?

a) True

b) False

c) Machine dependent

d) Error

16. Which of the following is not a complex number?

a) k = 2 + 3j

b) k = complex(2, 3)
c) k = 2 + 3l

d) k = 2 + 3J

17. What is the type of inf?

a) Boolean

b) Integer

c) Float

d) Complex

18. What does ~4 evaluate to?

a) -5

b) -4

c) -3

d) +3

19. What does ~~~~~~5 evaluate to?

a) +5

b) -11

c) +11

d) -5

20. Which of the following is incorrect?

a) x = 0b101

b) x = 0x4f5

c) x = 19023

d) x = 03964
NAVY CHILDREN SCHOOL

CHAPTER - CONDITIONAL AND ITERATIVE STATEMENTS

WORKSHEET

Time: 40 Min Max Marks: 20

1. What is the output of the following?

x = ['ab', 'cd']

for i in x:

i.upper()

print(x)

a) [‘ab’, ‘cd’].

b) [‘AB’, ‘CD’].

c) [None, None].

d) none of the mentioned

2. What is the output of the following?

x = ['ab', 'cd']

for i in x:

x.append(i.upper())

print(x)

a) [‘AB’, ‘CD’].

b) [‘ab’, ‘cd’, ‘AB’, ‘CD’].

c) [‘ab’, ‘cd’].

d) none of the mentioned


3. What is the output of the following?

i=1

while True:

if i%3 == 0:

break

print(i)

i+=1

a) 1 2

b) 1 2 3

c) error

d) none of the mentioned

4. What is the output of the following?

i=1

while True:

if i%0O7 == 0:

break

print(i)

i += 1

a) 1 2 3 4 5 6

b) 1 2 3 4 5 6 7

c) error

d) none of the mentioned


5. What is the output of the following?

i=5

while True:

if i%0O11 == 0:

break

print(i)

i += 1

a) 5 6 7 8 9 10

b) 5 6 7 8

c) 5 6

d) error

6. What is the output of the following?

i=5

while True:

if i%0O9 == 0:

break

print(i)

i += 1

a) 5 6 7 8

b) 5 6 7 8 9

c) 5 6 7 8 9 10 11 12 13 14 15 ….

d) error
7. What is the output of the following?

i=1

while True:

if i%2 == 0:

break

print(i)

i += 2

a) 1

b) 1 2

c) 1 2 3 4 5 6 …

d) 1 3 5 7 9 11 …

8. What is the output of the following?

i=2

while True:

if i%3 == 0:

break

print(i)

i += 2

a) 2 4 6 8 10 …

b) 2 4

c) 2 3

d) error
9. What is the output of the following?

i=1

while False:

if i%2 == 0:

break

print(i)

i += 2

a) 1

b) 1 3 5 7 …

c) 1 2 3 4 …

d) none of the mentioned

10. What is the output of the following?

True = False

while True:

print(True)

break

a) True

b) False

c) None

d) none of the mentioned

11. What is the output of the following?

i=0

while i < 5:

print(i)

i += 1
if i == 3:

break

else:

print(0)

a) 0 1 2 0

b) 0 1 2

c) error

d) none of the mentioned

12. What is the output of the following?

i=0
while i < 3:
print(i)
i += 1
else:
print(0)
a) 0 1 2 3 0

b) 0 1 2 0

c) 0 1 2

d) error

13. What is the output of the following?

x = "abcdef"

while i in x:

print(i, end=" ")

a) a b c d e f

b) abcdef

c) i i i i i i …

d) error
14. What is the output of the following?

x = "abcdef"

i = "i"

while i in x:

print(i, end=" ")

a) no output

b) i i i i i i …

c) a b c d e f

d) abcdef

15. What is the output of the following?

x = 'abcd'

for i in x:

print(i.upper())

a) a b c d

b) A B C D

c) a B C D

d) error

16. What is the output of the following?

x = 'abcd'

for i in range(len(x)):

i.upper()

print (x)

a) a b c d

b) 0 1 2 3
c) error

d) none of the mentioned

17. What is the output of the following?

x = 'abcd'

for i in range(len(x)):

x = 'a'

print(x)

a) a

b) abcd abcd abcd

c) a a a a

d) none of the mentioned

18. What is the output of the following?

x = 'abcd'

for i in range(len(x)):

print(x)

x = 'a'

a) a

b) abcd abcd abcd abcd

c) a a a a

d) none of the mentioned

19. What is the output of the following?

x = 123

for i in x:

print(i)
a) 1 2 3

b) 123

c) error

d) none of the mentioned

20 . What is the output of the following?

d = {0: 'a', 1: 'b', 2: 'c'}

for i in d:

print(i)

a) 0 1 2

b) a b c

c) 0 a 1 b 2 c

d) none of the mentioned

Answer 1: a
Explanation: The function upper() does not modify a string in place, it returns a new
string which isn’t being stored anywhere

Answer 2: d
Explanation: The loop does not terminate as new elements are being added to the
list in each iteration.

Answer 3: c
Explanation: SyntaxError, there shouldn’t be a space between + and = in +=.

Answer 4: a
Explanation: Control exits the loop when i become

Answer 5: b
Explanation: 0O11 is an octal number.

Answer6: d
Explanation: 9 isn’t allowed in an octal number.

Answer 7: d
Explanation: The loop does not terminate since i is never an even number.
Answer 8: b
Explanation: The numbers 2 and 4 are printed. The next value of i is 6 which is
divisible by 3 and hence control exits the loop

Answer 9: d
Explanation: Control does not enter the loop because of False..

Answer 10 : d
Explanation: SyntaxError, True is a keyword and it’s value cannot be changed.

Answer 11: b
Explanation: The else part is not executed if control breaks out of the loop.

Answer 12: b
Explanation: The else part is executed when the condition in the while statement is
false.

Answer 13: d
Explanation: NameError, i is not defined.

Answer 14: a
Explanation: “i” is not in “abcdef”.

Answer 15: b
Explanation: The instance of the string returned by upper() is being printed.

Answe 16 : c
Explanation: Objects of type int have no attribute upper().

Answer 17: c
Explanation: range() is computed only at the time of entering the loop.

Answer 18 : d
Explanation: abcd a a a is the output as x is modified only after ‘abcd’ has been
printed once.

Answer 19: c
Explanation: Objects of type int are not iterable.

Answer 20: a
Explanation: Loops over the keys of the dictionary.
NAVY CHILDREN SCHOOL

CHAPTER : STRING MANIPULATION

WORKSHEET

Time: 40 Min Max Marks: 20

1. What is the output when following statement is executed ?

>>>"a"+"bc"

a) a

b) bc

c) bca

d) abc

2. What is the output when following statement is executed ?

>>>"abcd"[2:]

a) a

b) ab

c) cd

d) dc

3. The output of executing string.ascii_letters can also be achieved by:

a) string.ascii_lowercase_string.digits

b) string.ascii_lowercase+string.ascii_upercase

c) string.letters

d) string.lowercase_string.upercase
4. What is the output when following code is executed ?

>>> str1 = 'hello'

>>> str2 = ','

>>> str3 = 'world'

>>> str1[-1:]

a) olleh

b) hello

c) h

d) o

5. What arithmetic operators cannot be used with strings ?

a) +

b) *

c) –

d) All of the mentioned

6. What is the output when following code is executed ?

>>>print r"\nhello"

The output is

a) a new line and hello

b) \nhello

c) the letter r and then hello

d) error

7. What is the output when following statement is executed ?

>>>print('new' 'line')

a) Error

b) Output equivalent to print ‘new\nline’


c) newline

d) new line

8. What is the output when following statement is executed ?

>>> print(‘x\97\x98’)

a) Error

b) 97

98

c) x\97

d) \x97\x98

9. What is the output when following code is executed ?

>>>str1="helloworld"

>>>str1[::-1]

a) dlrowolleh

b) hello

c) world

d) helloworld

10. print(0xA + 0xB + 0xC) :

a) 0xA0xB0xC

b) Error

c) 0x22

d) 33

11. What is the output of the following?

print("xyyzxyzxzxyy".count('yy'))

a) 2

b) 0
c) error

d) none of the mentioned

12. What is the output of the following?

print("xyyzxyzxzxyy".count('yy', 1))

a) 2

b) 0

c) 1

d) none of the mentioned

13. What is the output of the following?

print("xyyzxyzxzxyy".count('yy', 2))

a) 2

b) 0

c) 1

d) none of the mentioned

14. What is the output of the following?

print("xyyzxyzxzxyy".count('xyy', 0, 100))

a) 2

b) 0

c) 1

d) error

15. What is the output of the following?

print("xyyzxyzxzxyy".count('xyy', 2, 11))

a) 2

b) 0

c) 1

d) error
16. What is the output of the following?

print("xyyzxyzxzxyy".count('xyy', -10, -1))

a) 2

b) 0

c) 1

d) error

1 Answer: d

2 Answer: c

3 Answer: b

4 Answer: d

5 Answer: c

6 Answer: b

7 Answer: c

8 Answer: c

9 Answer: a

10 Answer: d

11 Answer: a

12 Answer: a

13 Answer: c

14 Answer: a

15 Answer: b

16 Answer: b
NAVY CHILDREN SCHOOL

CHAPTER : DEBUGGING PROGRAMS

WORKSHEET

Time: 40 Min Max Marks: 20

1. Examination of the program step by step is called ______________

a) Controlling

b) Tracing

c) Stepping

d) Testing

2. The examination of changing values of variables is called stepping.

a) True

b) False

3. A freeware GNU Debugger is __________

a) GDB

b) GNB

c) FDB

d) FNB

4. Which of the following is written for getting help in GDB?

a) he

b) h

c) assist

d) assistant
5. h command gives ___________

a) A list of all the commands starting from h

b) Describes all the commands

c) Displays a short description of the command

d) Displays all the programs

6. ____________ creates an inferior process that runs your program.

a) run

b) exit

c) execute

d) e

7. Which of the following does not affects the execution of the program?

a) Arguments

b) Environment

c) Control

d) I/o

8. ‘set args ‘ without arguments can ___________

a) initialize all the arguments

b) remove all the arguments

c) no change

d) show all the arguments

9. Which is not involved in debugging?

a) Identifying

b) Isolating
c) Test

d) Fixing

10. run > outfile command is used to _________

a) direct output to the file outfile

b) jump to a file outfile

c) enter a file outfile

d) edit a file outfile


NAVY CHILDREN SCHOOL

CHAPTER : LISTS

WORKSHEET

Time: 40 Min Max Marks: 20

1. Process of removing errors called

a) Error Free

b) Debug

c) Syntax Error

d) Exception

2. Which of the following commands will create a list?


a) list1 = list()
b) list1 = [].
c) list1 = list([1, 2, 3])
d) all of the mentioned

3. What is the output when we execute list(“hello”)?


a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’].
b) [‘hello’].
c) [‘llo’].
d) [‘olleh’].

4. Suppose list Example is [‘h’,’e’,’l’,’l’,’o’], what is len(list Example)?


a) 5
b) 4
c) None
d) Error

5. Suppose list1 is [2445, 133, 12454, 123], what is max(list1) ?


a) 2445
b) 133
c) 12454
d) 123

6. Suppose list1 is [3, 5, 25, 1, 3], what is min(list1) ?


a) 3
b) 5
c) 25
d) 1

7. Suppose list1 is [1, 5, 9], what is sum(list1) ?


a) 1
b) 9
c) 15
d) Error

8. To shuffle the list(say list1) what function do we use ?


a) list1.shuffle ()
b) shuffle(list1)
c) random.shuffle(list1)
d) random.shuffleList(list1)

9. Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], which of the following is correct syntax for
slicing operation?
a) print(list1[0])
b) print(list1[:2])
c) print(list1[:-2])
d) all of the mentioned

10. Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1] ?
a) Error
b) None
c) 25
d) 2

11. Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1] ?
a) [2, 33, 222, 14].
b) Error
c) 25
d) [25, 14, 222, 33, 2].

12. What is the output when following code is executed ?

>>>names = ['Amir', 'Bear', 'Charlton', 'Daman']

>>>print(names[-1][-1])

a) A

b) Daman
c) Error

d) n

13. What is the output when following code is executed ?

names1 = ['Amir', 'Bear', 'Charlton', 'Daman']

names2 = names1

names3 = names1[:]

names2[0] = 'Alice'

names3[1] = 'Bob'

sum = 0

for ls in (names1, names2, names3):

if ls[0] == 'Alice':

sum += 1

if ls[1] == 'Bob':

sum += 10

print sum

a) 11

b) 12

c) 21

d) 22

14. Suppose list1 is [1, 3, 2], What is list1 * 2 ?

a) [2, 6, 4].

b) [1, 3, 2, 1, 3].

c) [1, 3, 2, 1, 3, 2] .

D) [1, 3, 2, 3, 2, 1].
15. Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is :

a) [0, 1, 2, 3].

b) [0, 1, 2, 3, 4].

c) [0.0, 0.5, 1.0, 1.5].

d) [0.0, 0.5, 1.0, 1.5, 2.0].

16. What is the output when following code is executed ?

>>>list1 = [11, 2, 23]

>>>list2 = [11, 2, 2]

>>>list1 < list2 is

a) True

b) False

c) Error

d) None

17. To add a new element to a list we use which command ?

a) list1.add(5)

b) list1.append(5)

c) list1.addLast(5)

d) list1.addEnd(5)

18. To insert 5 to the third position in list1, we use which command ?

a) list1.insert(3, 5)

b) list1.insert(2, 5)

c) list1.add(3, 5)

d) list1.append(3, 5)
19. To remove string “hello” from list1, we use which command ?

a) list1.remove(“hello”)

b) list1.remove(hello)

c) list1.removeAll(“hello”)

d) list1.removeOne(“hello”)

20. Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5) ?

a) 0

b) 1

c) 4

d) 2

Answers

1 – b 2 – d, 3-a,4-a,5-c,6-d,7-c,8c,9-d,10-c,11-a,12-d,13-b,14-c,15-c,16-b,17-b,18-
a,19-a,20-d
NAVY CHILDREN SCHOOL

CHAPTER : TUPLES

WORKSHEET

Time: 40 Min Max Marks: 20

1. Which of the following is a Python tuple?

a) [1, 2, 3].

b) (1, 2, 3)

c) {1, 2, 3}

d) {}

2. Suppose t = (1, 2, 4, 3), which of the following is incorrect?

a) print(t[3])

b) t[3] = 45

c) print(max(t))

d) print(len(t))

3. What will be the output?

>>>t=(1,2,4,3)

>>>t[1:3]

a) (1, 2)

b) (1, 2, 4)

c) (2, 4)

d) (2, 4, 3)

4. What will be the output?

>>>t=(1,2,4,3)
>>>t[1:-1]

a) (1, 2)

b) (1, 2, 4)

c) (2, 4)

d) (2, 4, 3)

5. What will be the output?

>>>t = (1, 2, 4, 3, 8, 9)

>>>[t[i] for i in range(0, len(t), 2)]

a) [2, 3, 9].

b) [1, 2, 4, 3, 8, 9].

c) [1, 4, 8].

d) (1, 4, 8)

6. What will be the output?

d = {"john":40, "peter":45}

d["john"]

a) 40

b) 45

c) “john”

d) “peter”

7. What will be the output?

>>>t = (1, 2)

>>>2 * t

a) (1, 2, 1, 2)

b) [1, 2, 1, 2].
c) (1, 1, 2, 2)

d) [1, 1, 2, 2].

8. What will be the output?

>>>t1 = (1, 2, 4, 3)

>>>t2 = (1, 2, 3, 4)

>>>t1 < t2

a) True

b) False

c) Error

d) None

9. What will be the output?

>>>my_tuple = (1, 2, 3, 4)

>>>my_tuple.append( (5, 6, 7) )

>>>print len(my_tuple)

a) 1

b) 2

c) 5

d) Error

10. What will be the output?

numberGames = {}

numberGames[(1,2,4)] = 8

numberGames[(4,2,1)] = 10

numberGames[(1,2)] = 12

sum = 0
for k in numberGames:

sum += numberGames[k]

print len(numberGames) + sum

a) 30

b) 24

c) 33

d) 12

11. What is the data type of (1)?

a) Tuple

b) Integer

c) List

d) Both tuple and integer

12. If a=(1,2,3,4), a[1:-1] is

a) Error, tuple slicing doesn’t exist

b) [2,3].

c) (2,3,4)

d) (2,3)

13. What is the output of the following code?

>>> a=(1,2,(4,5))

>>> b=(1,2,(3,4))

>>> a<b

a) False

b) True

c) Error, < operator is not valid for tuples

d) Error, < operator is valid for tuples but not if there are sub-tuples
14. What is the output of the following piece of code when executed in Python
shell?

>>> a=("Check")*3

>>> a

a) (‘Check’,’Check’,’Check’)

b) * Operator not valid for tuples

c) (‘CheckCheckCheck’)

d) Syntax error

15. What is the output of the following code?

>>> a=(1,2,3,4)

>>> del(a[2])

a) Now, a=(1,2,4)

b) Now, a=(1,3,4)

c) Now a=(3,4)

d) Error as tuple is immutable

16. What is the output of the following code?

>>> a=(2,3,4)

>>> sum(a,3)

a) Too many arguments for sum() method

b) The method sum() doesn’t exist for tuples

c) 12

d) 9
17. Is the following piece of code valid?

>>> a=(1,2,3,4)

>>> del a

a) No because tuple is immutable

b) Yes, first element in the tuple is deleted

c) Yes, the entire tuple is deleted

d) No, invalid syntax for del method

18. What type of data is: a=[(1,1),(2,4),(3,9)]?

a) Array of tuples

b) List of tuples

c) Tuples of lists

d) Invalid type

19. What is the output of the following piece of code?

>>> a=(0,1,2,3,4)

>>> b=slice(0,2)

>>> a[b]

a) Invalid syntax for slicing

b) [0,2].

c) (0,1)

d) (0,2)

20. Is the following piece of code valid?

>>> a=(1,2,3)

>>> b=('A','B','C')

>>> c=zip(a,b)
a) Yes, c will be ((1,2,3),(‘A’,’B’,’C’))

b) Yes, c will be ((1,2,3),(‘A’,’B’,’C’))

c) No because tuples are immutable

d) No because the syntax for zip function isn’t valid

Answers

1 – b 2 – b, 3-c,4-c,5-c,6-a,7-a,8-b,9-d,10-c,11-b,12-d,13-a,14-c,15-d,16-c,17-c,18-
b,19-c,20-a

NAVY CHILDREN SCHOOL

CHAPTER : DICTIONARIES

WORKSHEET

Time: 40 Min Max Marks: 20

1. Which of the following statements create a dictionary?

a) d = {}

b) d = {“john”:40, “peter”:45}

c) d = {40:”john”, 45:”peter”}

d) All of the mentioned

2. Read the code shown below carefully and pick out the keys?

d = {"john":40, "peter":45}

a) “john”, 40, 45, and “peter”

b) “john” and “peter”

c) 40 and 45

d) d = (40:”john”, 45:”peter”)

3. What will be the output?


d = {"john":40, "peter":45}

"john" in d

a) True

b) False

c) None

d) Error

4. What will be the output?

d1 = {"john":40, "peter":45}

d2 = {"john":466, "peter":45}

d1 == d2

a) True

b) False

c) None

d) Error

5. What will be the output?

d1 = {"john":40, "peter":45}

d2 = {"john":466, "peter":45}

d1 > d2

a) True

b) False

c) Error

d) None

6. What is the output?

d = {"john":40, "peter":45}
d["john"]

a) 40

b) 45

c) “john”

d) “peter”

7. Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command
do we use

a) d.delete(“john”:40)

b) d.delete(“john”)

c) del d[“john”].

d) del d(“john”:40)

8. Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary


which command do we use?

a) d.size()

b) len(d)

c) size(d)

d) d.len()

9. What will be the output?

d = {"john":40, "peter":45}

print(list(d.keys()))

a) [“john”, “peter”].

b) [“john”:40, “peter”:45].

c) (“john”, “peter”)

d) (“john”:40, “peter”:45)
10. Suppose d = {“john”:40, “peter”:45}, what happens when we try to retrieve a
value using the expression d[“susan”]?

a) Since “susan” is not a value in the set, Python raises a KeyError exception

b) It is executed fine and no exception is raised, and it returns None

c) Since “susan” is not a key in the set, Python raises a KeyError exception

d) Since “susan” is not a key in the set, Python raises a syntax error

11. Which of these about a dictionary is false?

a) The values of a dictionary can be accessed using keys

b) The keys of a dictionary can be accessed using values

c) Dictionaries aren’t ordered

d) Dictionaries are mutable

12. Which of the following is not a declaration of the dictionary?

a) {1: ‘A’, 2: ‘B’}

b) dict([[1,”A”],[2,”B”]])

c) {1,”A”,2”B”}

d) {}

13. What is the output of the following code?

a={1:"A",2:"B",3:"C"}

for i,j in a.items():

print(i,j,end=" ")

a) 1A2B3C

b) 123

c) ABC
d) 1:”A” 2:”B” 3:”C”

14. What is the output of the following piece of code?

a={1:"A",2:"B",3:"C"}

print(a.get(1,4))

a) 1

b) A

c) 4

d) Invalid syntax for get method

15. What is the output of the following code?

a={1:"A",2:"B",3:"C"}

print(a.get(5,4))

a) Error, invalid syntax

b) A

c) 5

d) 4

16. What is the output of the following code?

a={1:"A",2:"B",3:"C"}

print(a.setdefault(3))

a) {1: ‘A’, 2: ‘B’, 3: ‘C’}

b) C

c) {1: 3, 2: 3, 3: 3}

d) No method called setdefault() exists for dictionary


17. What is the output of the following code?

a={1:"A",2:"B",3:"C"}

a.setdefault(4,"D")

print(a)

a) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’}.

b) None.

c) Error.

d) [1,3,6,10].

18. What is the output of the following code?

a={1:"A",2:"B",3:"C"}

b={4:"D",5:"E"}

a.update(b)

print(a)

a) {1: ‘A’, 2: ‘B’, 3: ‘C’}

b) Method update() doesn’t exist for dictionaries

c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}

d) {4: ‘D’, 5: ‘E’}

19. What is the output of the following code?

a={1:"A",2:"B",3:"C"}

b=a.copy()

b[2]="D"

print(a)

a) Error, copy() method doesn’t exist for dictionaries

b) {1: ‘A’, 2: ‘B’, 3: ‘C’}

c) {1: ‘A’, 2: ‘D’, 3: ‘C’}


d) “None” is printed

20. What is the output of the following code?

a={1:"A",2:"B",3:"C"}

a.clear()

print(a)

a) None

b) { None:None, None:None, None:None}

c) {1:None, 2:None, 3:None}

d) {}

Answers

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
D B A B C A C B A C B C A B D B A C B D

*************
NAVY CHILDREN SCHOOL,
Subject: Computer Science (Code-083)
Class – XI Term-1
Time Allowed: 90 minutes Maximum Marks: 35

General Instructions:
• The paper is divided into 3 Sections- A, B and C.
• Section A, consists of Question 1 to 25 and student need to attempt 20 questions.
• Section B, consists of Question number 26 to 49 and student need to attempt 20 questions.
• Section C, consists of Question number 50 to 55 and student need to attempt 5 questions.
• All questions carry equal marks.
Section – A
Section A consists of 25 questions, attempt any 20 questions.
Q1. Example of input device is :
a. Keyboard
b. Scanner
c. Microphone
d. All of the above

Q2. Data entered through input device is temporarily stored in


a. RAM
b. ROM
c. Hard disk
d. All of the above

Q3. 3TB = GB
a. 1024
b. 3072
c. 2048
d. None of the above

Q4. Which of the following is not the category of Software?


a. System Software
b. Application Software
c. Systematic Software
d. None of the above

Q5. Which of the following is not a system software?


a. Operating System
b. System Utilities
c. Microsoft Word
d. Device Drivers

Q6. FOSS stands for


a. Free and Open Source Software
b. Freeware and Open Source Software
c. Fresh and Open Source Software
d. None of the above

Q7. The decimal number is repeatedly divided by to obtain its equivalent octal number.
a. 2
b. 8
c. 10
d. 16

Q8. Decimal number is repeatedly divided by to obtain its equivalent hexadecimal number.
a. 10
b. 2
c. 8
d. 16
Q9. in a binary number are grouped together to get octal number.
a. 4 bits
b. 2 bits
c. 3 bits
d. 5 bits

Q10. Let X be a number system having B symbols only. Write down the base value of this number
system.
a. A
b. B
c. X
d. AB

Q11. Which of the following can be used as valid variable identifiers in Python?
a.4th Sum
b.Total
c.Number#
d.5Data

Q12. According to boolean law: A + 1 = ?


a) 1
b) A
c) 0
d) A‟

Q13DeMorgan‟s theorem states that


a) (AB)‟ = A‟ + B‟
b) (A + B)‟ = A‟ * B
c) A‟ + B‟ = A‟B‟
d) (AB)‟ = A‟ + B

Q14. Complement of the expression A‟B + CD‟ is


a) (A‟ + B)(C‟ + D)
b) (A + B‟)(C‟ + D)
c) (A‟ + B)(C‟ + D)
d) (A + B‟)(C + D‟)

Q15. The boolean function A + BC is a reduced form of


a) AB + BC
b) (A + B)(A + C)
c) A‟B + AB‟C
d) (A + C)B

Q16. The expression for Absorption law is given by


a) A + AB = A
b) A + AB = B
c) AB + AA‟ = A
d) A + B = B + A

Q17. Smallest element of of python coding is called


a. Identifiers
b. Token
c. Keywords
d. Delimiters

Q18. Which of the following is not a token?


a. //
b. “X”
c. ##
d. 23

Q19. Write the output of the following code:


x=2
x=5
x=x+x
print(x)
a. 7
b. 4
c. 10
d. Error

Q20. Write the output of the following code :


x=2
y=3
x+y+5
print(x+y)
a. 10
b. 5
c. Error
d. None of the above

Q21. Which of the following symbol is used to write comment?


a. ?
b. //
c. #
d.*

Q22. Which of the following is a sequence data type?


a. String
b. Integer
c. Float
d. Dictionary

Q23. is a set of valid characters that a language can recognize.


a. Identifier
b. Token
c. Character set
d. Character group

Q24. Which operator is used for string concatenation?


a. *
b. //
c. +
d. –

Q25. Which of the following is invalid Identifier?


a. break
b. FILE34
c. F_L
d. Myname
Section – B

Section B consists of 24 Questions (26 to 49). Attempt any 20 questions.

Q26. How many operators are used in the following statement?


7 + 4 * 8 // 2 ** 2 - 6 / 1
a. 5
b. 6
c. 7
d. 8

Q27. Write the output of the following code :


s="blog"
for i in range(-1,-len(s),-1):
print(s[i],end="$")
a. g$o$l$b$
b. g$o$l$
c. Error
d. None of the above
Q28. Write the output of the following code :
s= "str"
s1 = "string"
print(s1 in s)
a. True
b. False
c. Error
d. None of the above

Q29. Write the output of the following code :


print("Amita" > "amit")
a. True
b. False
c. Error
d. None of the above

Q30. What is the ASCII value of “A”?


a. 97
b. 66
c. 65
d. 96

Q31. Write the output of the following code:


print("Str"[1:2])
a. t
b. No Output
c. Error
d. None of the above

Q32. Write the output of the following code:


for i in range(65,70):
print(chr(i))
a. Error
b. TypeError
c.
A
B
C
D
E
d. ABCDE

Python String
Q33. Write the output of the following:
print(“A#B#C#D#E”.split(“#”,2))
a. [„A‟, „B‟, „C#D#E‟]
b. [„A#‟, „B#‟, „C#D#E‟]
c. [„A‟, „B‟, „C‟ , „D‟ , „E‟]
d. Error

Q34. Write the output of the following:


print(“A#B#C#D#E”.replace(“#”,”?”))
a. A#B#C#D#E
b. A?B?C?D?E
c. Can not replace as Strings are immutable
d. Error

Q35. Write the output of the following:


print(“I love my Country”.find(“o”,4))
a. 3
b. 12
c. 11
d. 3,11
Q36. Which of the following is mapping data type in Python?
a. String
b. List
c. Dictionary
d. Tuple
Q37. Variables whose values can be changed after they are created and assigned are called

a. mutable
b. immutable
c. changeable
d. None of the above

Q38. An is a symbol which is used to perform specific mathematical or logical


operation on values.
a. Operand
b. Operator
c. Keyword
d. Identifier
Q39. Operators work on values called _
a. Operating
b. Operand
c. data value
d. Opvalue
Q40. Which of the following operator is used for integer division?
a. /
b. //
c. \\
d. \
Q41. Which operator returns remainder?
a. /
b. //
c. %
d. \\
Q42. Which of the following is an exponent operator?
a. *
b. /
c. **
d. ***
Q43. Write the output of the following:

print('aisabisacisadisae'.split('isa',3))
a. [„a‟, „b‟, „c‟, „disae‟]
b. [„a‟, „b‟, „cisadisae‟]
c. [„a‟, „b‟, „c‟, „d‟, „e‟]
d. None of the above

Q44. Write the output of the following:

print('aisabisacisadisae'.split('isa'))
a. [„a‟, „b‟, „c‟, „disae‟]
b. [„a‟, „b‟, „cisadisae‟]
c. [„a‟, „b‟, „c‟, „d‟, „e‟]
d. None of the above

Q45. print(“aNd&*”.swapcase()) will display

a. AnD*&
b. AnD&*
c. aNd&*
d. Error

Q46. Write the output of the following:

print('hash-tag'.title())
a. HashTag
b. Hash-tag
c. Hash-Tag
d. Error
Q47. Fill in the blank given below to get output – “amit is a g@@d boy”

print('amit is a good boy'.replace('o', '@', ))


a. 0
b. 1
c. 2
d. Nothing

Q48. print(„Welcome TO My Blog‟.istitle()) will display _


a. True
b. False
c. Error
d. None of the above

Q49. print(„Welcome TO My Blog'[2:6]) will display


a. lcom
b. lcome
c. lco
d. None of the above

Section - C
Section C, consists of 6 Question (50 to 56). Attempt any 5 questions.
Case Study
Consider the code given below and answer

50. mHow many times the loop executes?

(a) 5 time (b) 4 times


(c) 3 times (d) 6 times

51 .What would be the output of the above code?


(a) 11 2*10 4*9 6* (b) 11 2*9 4*8
(c) 11 2*10 4*9 5* (d) 11 2*10 4*8 7*
52. What would be the value of variable y after execution of the
loop?
(a)5* 6* 9* (b) 2 * 4* 6*
(c) 3* 5* 4* (d) 2* 4 *8*
53. What is the start and stop in the above loop?
(a) start=11, stop=10 (b) start=11, stop=9

(c) Start=11, stop=8 (d) start=11, stop=11


54. What would be the value of variable x after execution of the
loop?
(a)11 10 9 (b) 10 10 9 8
(c) 11 10 9 8 (d) 2 4 8
55. The variable y increment by .

(a)1 (b) 3

(c) 4 (d) 2.
TERM-2 SQP
**********

You might also like