CS Mid term Evening
CS Mid term Evening
ofp,iges - 8 (E)
MID-TERM EXAMINATION (2023-24)
CLASS: XI
SUBJECT: COMPUTER SCIEN<..:E (083)
Time Allowed : 3 hours Maximum Marks : 70
GENERA L INSTRUCTIONS:
Please check this question paper contains 35 questions.
• The paper is divided into 5 Sections- A' B, C, D and E.
• Section A , consists of 18 questions ( I to 18). Each question carries I Mark.
• Section B, consists of 7 questions ( 19 to 25). Each question carries 2 Marks.
• Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
• S~ction D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
• Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
r·• All programming questions are to be answered using Python Language only.
' **~**********
SECTION-A
(18 marks)
1. Which term is used to describe the device that inputs data into a computer?
A. Output Device
B. Storage Device
C. Input Device
D. Display Device
2. How many bytes are in one megabyte (MB)?
A. 2 10 bytes
B: 220 byt,es
C. 230 bytes
D. None of these
XI-COMPUTER SC.-£.
I
A. String
B. List
C. Tuple
D. None of the above
A. 14
8. 27
C. 12
D. 17
2 XI-COMPUTIR SC.-£
9. Identify lhc invalid variab le name from the foll owing options:
A. 2day
8. my_ 3
C. day_2
0. _2day
J0. Which function is used to determine the data type of a variable in Python?
A. string()
B. type()
C. float()
0. d_type()
A To restart a loop
B. Terminate a loop
C. To jump in between the loop
D. None of the above
13. Which of the following is not a valid expression?
A. a=200
B. b = 100
C. sum= a + b
o. a+ b = sum
C. *
D. II
15. ln Python, the terms False; else, and pass refer to:
A. Literals
B. Keywords
C. Variables
D. Punctuators
16. What is the output of the following code? .
i=3
while True:
if i % 5 == 0:
break
)
print(i, end=") .,
i += l
A. .245
B. 34
C. 32 2
D. error
17. Consider the code given below:
x=5
print(x==5)
ASN: Output of above python code is True.
RSN: '=' is not relational Operator.
A. Only ASN is true.
B. Only RSN is true.
c. Both ASN and RSN are true, but RSN is not correct reason of ASN.
D. Both ASN and RSN are true, but RSN is correct reasoning of ASN.
4 XI-COMPUT ER SC-I
JH AS'\. \\ c (,In mt~d,h ._ hantl' h.'1' tn a ~,not! ,111,•1 1t, ltl' 1llnn
( H,,th .\";-,.,. and RSi\ ,m.' 1n1c, but RSN ,., not correct rc,1,,m 111 \
n ~fot h \ S'\J .mJ RSN arc true. and RS7' ,., c orrclt rca'°n (lf ,\
S~ { I 10'\- B
Jq. Wntc do,,n 1ru1h table~ for the NANO and ~OR logi\. gate" I - I :.
OR
Con\.cn the Binary number "1 100001 1·· to Octal and He.."adccinu l.
2-0 I xplam the following with a ~uitable example of each I I 2
a Hardware
b. Software
2}
.., Write a Python progra m using the continue ,tah:mcnt 10 pnnt .,II in1c~a, trnm
0 LO 15 except 5. -i
OR
\ \ rite a progra m tn input J side~ of ::i tria ngk :ind find out \\ hcthl·r lhl: 1n .111gk ,.., ..1.n
Equdaleral Lnanglc (all sides arc equa l) or not
\\ rite a Pytho n progrnm to cumpule sirnpk 1ntcl"t'~l The ,aluL: ol Pnnc1 p~1I. R~Hc . •md
T 1me -,hould bl· tal-cn as input frnm u~er. ~
0 1fkrcn11a1c bcmccn t\tu rnb le nnd Immutable dara objec~ 111 P)th1..,11 G1,c o nl' ~, .imrk
of each . ~
OR
.:;_--i. \vn tc a Python prngrnm th,11 L::t ~ t:'> J ::.mng Ill ) Str .h mptll .ind d1 , pb ) :- .1lt1..·nu11..'
LharJll t:r, (1 t: 1-.t ( hJmL·tcr, Jrd Ch.1r.1c1cr ,Intl ,l, ,111) l, f 1h1..· ._ ,r11 1~ l ,,r l''\ .llllpk. 11
111) '-itr ·· r rot--'r:Hllll'lln g" I hl· ,1n11.·mcn1 -.hn1ild d i-.pl.1~ r,)n HI ~ ·" 11u1p111 "
OR
\
Write syntax of
I. if-else statements
2. for Loop
2fr. What do you mean by variable? Write down any twu rule~ for naming a variabl1; ;;,
Python. .,
SECTION-C
(15 ,\fark1iJ
26. Explain the following with a suitable example for each
(a) Application Software
(b) System Software
(c) Programming Tools
,_J;I. Perform the following conversions 3
(a) Convert (64) 10 to binary.
(b) Convert (544) 8 to decimal.
(c) Convert (4A) 16 to octal.
-28. Write a Python Program which accepts three numbers from user and displays their sum
and average. 33
OR
3,
Write a Python program that takes a number as input and prints the multiplication table
(first 5 multiple) of that number using for loop.
Explain the use of break and continue statements in Python by giving a suitable example.,
of each . ~
Write the use of the following function in strings with help ofan example.
(a) count()
(b) upper()
(c) is lower()
SECTION-D
(8 Marks)
31 . What is an Operating System and write its any two function? Define the OS user
interface. Explain any one difference between a command-line interface and a graphical
user interface. · 4
6 XI-COMPUTER SC.-£
., fill in th e blanks to create a program in Python that takes a string as input and returns the
l~· number of vowels in the string. 4
(a) Write the name of the function to be used in the blank space in Statement- I.
(d) Write the variable name to be used in the blank space in Statement-4.
SECTION-E
(15 Marks)
V Write a program in Python to check if a number entered by the user is a prime number or
not. 5
/ Write a Python program that accepts a string as input and displays the number
of uppercase letters, the number of lowercase letters, the number of digits within the
string. 5
OR
V Write a Python program that accepts the role number and marks of the student in two
subjects and displays the grade of the student as per the following criteria 5
7 XI-COI\IPllT[R SC.-£
Explain the following with one example of each
(a) Error
(b) Syntax ·e rror
(c) Logical error
(d) Run-time error
(e) Explicit type conversion