Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CLASS :XI
SUBJECT: COMPUTER SCIENCE
Time : 3hours MM:70
Instructions: 1. All questions are compulsory
2.Programming Language : PYTHON
Q1
a) “Python is an interpreted high level language”.What does this mean? 1
b) Write two advantages and disadvantages of Python. 2
c) What is the difference between a keyword and an identifier? Give example. 2
d) Which of the following identifiers are valid? Give reasons , if invalid:
INFO-PR, MYFILE, , while , comp_sc 2
e) Define Decision Tree . Explain with example 3
Q2 :
a) What is the use of comments and indentation in a program? 2
How do we write comments in a program?
b) Define Dynamic Typing in context of a variable with example. 1
c) What is None in Python? 1
d) What will be the output of the following code : 2
a = 3+5/8
b= int(3+5/8)
c = 33//5
d=33%5
print (a,b, c, d)
e) Write the corresponding Python expressions for the following mathematical expressions: 2
(i) √a2 +b2+ c2
(ii) | e2 –x|
Q3:
a) What are mutable data types ? Explain with example. 2
Q5:
a) What are the types of Strings supported by Python ? Explain with example. 2
b)Write a program that reads a number and finds its factorial. 3
c): Write programs in Python :
i) To print Fibonacci series. 3
ii)To input a number and test if it is a prime number. 2
Q6:
a) Write the names of list methods to perform the following : 2
(i) Delete a given element from the list.
(ii) Add an element in the end of the list.
b) How tuples differ from list ? Explain with example. 2
c) Write a program in Python :
(i) to sort a list of elements using insertion sort. 3
(ii) To search for an element in a given list of numbers. 3
Q7:
a)What are state transition diagrams? Draw state transition diagram for game of chess. 3
b) Explain the use of following functions in list with example: 4
(i) insert ()
(ii) pop ()
c) Write a program in Python to count the frequency of elements in a list using a dictionary. 3
For example This is a Computer program. Computer programs are related to real world. Developing programs is
an art.
Output : This :1 , is : 2, a:1, Computer : 2 program : 1 are : 1 and so on.
*********************************************************************