0% found this document useful (0 votes)
6 views2 pages

Question

This document outlines the Pre-Mid Term examination for Computer Science (083) for Class XII at DAV Public Schools in Jharkhand Zone-C. It includes three sections with varying mark distributions: Section-A consists of multiple-choice questions, Section-B contains short answer questions, and Section-C features longer descriptive questions. The exam covers various topics related to Python programming, including variables, functions, modules, and error handling.

Uploaded by

manishmcamba2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Question

This document outlines the Pre-Mid Term examination for Computer Science (083) for Class XII at DAV Public Schools in Jharkhand Zone-C. It includes three sections with varying mark distributions: Section-A consists of multiple-choice questions, Section-B contains short answer questions, and Section-C features longer descriptive questions. The exam covers various topics related to Python programming, including variables, functions, modules, and error handling.

Uploaded by

manishmcamba2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

DAV PUBLIC SCHOOLS, JHARKHAND ZONE-C

Pre-Mid Term-2022

Sub: Computer Science (083) Time: 1½ Hrs.


Class: Std. XII M.M.: 40
 There are three sections (A, B and C) .
 Section-A contains 1 marks for each question.
 Section-B contains 2 marks for each question.
 Section-C contains 3 marks for each question.
 All Questions are Compulsory.

Section-A (MCQ) [ 1X 6= 6 ]
Q1: Which of the following is an invalid variable?
(a) _3 (b) Day_four (c) My_day_5 (d) 6_day
Q2: What is the value of x ?
x=int(13.25+4/2)
(a) 17 (b) 14 (c) 23 (d) 15
Q3: Which line of code produces an error ?
(a) “one” + ‘two’ (b) 1+2 (c) “one”+”2” (d) ‘1’+2
Q4: Suppose a tuple T is declared as T = (10,12,43,39), which of the following is incorrect?
(a) print(T[1]) (b) T[2]= -29 (c) print(max[T]) (d) print(len(T))
Q5: Which of the following keywords marks the beginning of the function block ?
(a) func (b) define (c) def (d) function
Q6: A Python module has _________extension.
(a) .mod (b) .imp (c) .py (d) .mpy

Section-B [ 2X 8 = 16 ]
Q7: What is a module and a library ?
Q8: Name the Python Library modules which need to be imported to invoke the following
functions:
(a) log() (b) radint (c) sqrt() (d) pow()
Q9: What will be the output of following program ?
(a) (b)
def display(): num=1
def myfunc():
print(“Hello”, end= ‘ ‘)
return num
display() print(num)
print(“there!”) print(myfunc())
print(num)

Q10: What is the differences between local and global variable?


Q11: Find the errors. State reasons.
(a) (b)
T=(1,”a”,9.2) T=[ 1,”a”,9.2 ]
T[0]=6 T[4]=6
Q12: What is the difference between a list and a tuple ?
Q13: Rewrite following code after removing all error(s):

Value=30
For VAL in range(0,Value)
If val%4 ==0:
Print(VAL * 4)
Elseif val % 5 ==0:
Print(VAL + 3)
Else
Print(VAL+10)

Q14: Evaluate the following expressions:


(a) 6 * 3 + 4**3//5-8 (b) 10>5 and 7 > 4 or not 18 > 3

Section-C [ 3 X 6 = 18 ]
Q15: What do you understand by the term Iteration? Explain with example.
Q16: How many times will the following for loop execute and what is the output?
for I in range(-1,7,2):
for j in range(3):
print(I,j)

Q17: Find the error in following code. State the reason of the error.

Alist = { ‘a’ : 1, ‘b’:2, ‘c’:3 }


print(Alist[‘a’, ‘b’])

Q18: What is the significance of having functions in a program?


Q19: What is the difference between the formal parameter(s) and actual parameter(s) with a
suitable example for each.
Q20: Create a module massconversion.py that stores function for mass conversion:

Kgtotonne() To convert kg to tonnes


Tonnetokg() To convert tonne to kg
Eg: 1 kg = 0.001 tonne
1 tonne=1000 kg

Pass parameter as per your choice and call both the functions properly.

******************************************************************

You might also like