[go: up one dir, main page]

0% found this document useful (0 votes)
13 views8 pages

Computer ScienceA2 MID TERM 2022 23 MS

This document contains the marking scheme for the Class XI Mid Term Examination in Computer Science for the academic year 2022-2023. It includes 27 questions covering various topics such as programming concepts, data types, software types, and Python coding exercises, along with their respective answers. The exam is structured with multiple-choice questions, coding tasks, and theoretical questions, totaling a maximum of 70 marks.

Uploaded by

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

Computer ScienceA2 MID TERM 2022 23 MS

This document contains the marking scheme for the Class XI Mid Term Examination in Computer Science for the academic year 2022-2023. It includes 27 questions covering various topics such as programming concepts, data types, software types, and Python coding exercises, along with their respective answers. The exam is structured with multiple-choice questions, coding tasks, and theoretical questions, totaling a maximum of 70 marks.

Uploaded by

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

CLASS XI

MID TERM EXAMINATION (2022-2023)


SUBJECT: COMPUTER SCIENCE
SET A2
(MARKING SCHEME)

TIME ALLOWED : 3 HRS. MAX. MARKS :70

General Instructions:

a) This question paper contains 5 pages.


b) There are 27 questions.
c) All questions are compulsory
d) Q1-Q10 are MCQs.
e) In error finding questions, write corrected code also.

Q1. What is the output of this expression, A=3*4//5+5//7+8-2+4//2? (1)


a) 12 b)10 c) 8 d) 14

Ans : b) 10

Q2. The return type of the input() function is (1)


a) string
b) integer
c) list
d) tuple

Ans : a) string

Q3. Consider the declaration L = '3.14+20j'. What will be the data type of L? (1)
a) list
b) tuple
c) dictionary
d) String
Ans : d) String

Q4. Which of the following symbols is used in python for single line comment? (1)
a) / b) /* c) // d) #

Ans. #

Q5. Which of the following is a complex number in Python? (1)


a) k=2+3j
b) k=complex(9)
c) k=complex(2,3)
d) All of the above

1
Ans : d) All of the above

Q6. There are ……………. types of strings supported in Python (1)


a) Two
b) Three
c) one
d) All of the above

Ans : a) Two

Q7. 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’)

Ans : c) & d)

Q8. What is the value of this expression? (1)


print((4**2)*3**3)

a) 432
b) 342
c) 164
d) 102

Ans :a) 432

Q9. Which of the following is an invalid variable? (1)


a) my_string_1 b) 1st_string c) foo d) _SNAME

Ans : b) 1st_string

Q10. Which of the following is an invalid statement? (1)


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

Ans: b) a b c = 1000 2000 3000

Q11. Differentiate between proprietary software and freeware software. Name two software for
each type. (2)

Ans.
Proprietary Software Freeware Software

2
Source code is not available Source code is available

Not free to use Free to use

example : Microsoft Windows, example : Python, LibreOffice,

Microsoft Office Open office

Q12. How does the computer understand a program written in high level language? (2)

Ans. Humans are able to write programs in high-level language while computers can
understand only machine language. so with the help of language translators (Compiler or
Interpreter) programs written in HLL can be converted into machine language which is
understood by computer.

Q13 Name the software required to make a computer functional. Write down its two primary
services. (2)

Ans. The software required to make a computer functional is Operating System (OS). It’s two
primary services are :
Memory management : It manages Primary or main memory of a computer system.
Device Management : It interacts with the device driver and the related software for a
particular device.

Q14. What is the need for RAM? How does it differ from ROM? (2)

Ans. RAM is used to store data temporarily while the computer is working. Whenever the
computer is started or a software application is launched, the required program and data
are loaded into RAM for processing.

RAM ROM
It stands for Random Access Memory It stands for Read Only Memory
It is volatile in nature It is non volatile
It stores data temporarily It stores instruction permanently

Q15 a) Draw the logic circuit for this Boolean expressions: (2x2=4)

i) A’B’C’D + AB’C’D+ A B C’D + A B C D’

ii) (X+Y).(X+Z)

3
b) In the Boolean Algebra, verify using truth table that X + XY = X (2)

c) Derive a Boolean expression for the output F for the logic circuit given shown below :
(2x2=4)

i)

Ans. (A’B’+CD)’
ii)

Ans. (A’.(A+B))

Q16. Perform the following conversions. (5x1=5)


(i) (10.75)8 = ( )2
(ii) (1010.1001)2=( )16
(iii) (BCA1)16 = ( )2
(iv) (6C.34)16 = ( )2
(v) (132.45)8 = ( )2

Q17. What are string literals? How many types of string literals are there? (2)

4
Ans. A string literal is a sequence of zero or more characters enclosed within single
quotation marks. The following are examples of string literals: 'Hello, world!' 'He
said, "Take it or leave it."' In python we have two types of string literals namely single
line strings and multiline strings.

Q18. What do you mean by data types? What are Python’s built-in core data types? (2)

Ans. Python Data Types are mainly of 3 types: Boolean, integer, and string. These may also be
called the core data types in Python.

Q19. What is the difference between implicit and explicit conversion? (2)

Ans. Implicit Type Conversion is automatically performed by the Python interpreter. Python
avoids the loss of data in Implicit Type Conversion. Explicit Type Conversion is also called
Type Casting, the data types of objects are converted using predefined functions by the
user.

Q20. What is the difference between interactive mode and script mode in Python? (2)

Ans. Script Mode, is used when the user is working with more than one single code or a block of
code. Interactive mode is used when an user wants to run one single line or one block of
code.

Q21. Evaluate the following expression (2)


a) not( 5>4 or 6<2 and 3 !=7)
b) print(3**2-1**2+10//2)

Ans.a) False
b) 22

Q22. Write a program to enter a number and print whether the number is positive, negative or
zero. (3)

Ans. Number = int(input("Enter a number :"))


if Number > 0:
print(Number, " is positive")
elif Number < 0:
print(Number, " is negative")
else:
print(Number, " is zero")
Q23. Write a program to input two integers x & n and then print the sum of the following series:
(3)
2 3 4 n
1+x+x +x +x +.............x

Ans. x=int(input(“Enter value of x”)


5
n=int(input(“Enter value of n”)
s=1
for i in range(n):
sum=sum+pow(x,i)
print(“sum=”, s)

Q24.Write a program to input the weight of a person(kgs) and height(meters),calculate


BMI(kg/mtr*mtr) and then print nutritional status as per the given table. (3)

Ans. wt=int(input(“Enter weight in kg”)


ht=int(input(“Enter height in meters”)
bmi=wt/ht*ht
if bmi <18.5:
print(“underweight”)
elif bmi<24.9 :
print(“normal”)
elif bmi<29.9 :
print(“overweight”)
else:
print(“obese”)

Q25. A school conducts 3 weekly tests of 30 marks each and a term exam of 100 marks. To
calculate the aggregate percentage of marks obtained by a student, calculations are done as
follows:
Aggregate Percentage = (weekly test total)/3+70% of term exam.
Write a Python script to calculate and display the aggregate percentage of a student after
taking the marks of the student in the three weekly tests and the term exam. (3)

Ans.wt1=int(input(“Enter marks in weekly test 1”)


wt2=int(input(“Enter marks in weekly test 2”)
wt3=int(input(“Enter marks in weekly test 3”)
term=int(input(“Enter marks in Term 1”)
agg=(wt1+wt2+wt3)/3+0.70*term
print(agg)

Q26. Identify errors in the following code and rewrite the code by underlining the corrections.
(3x2=6)
a) A=B=12/5
if A!=b
print"Not equal"
else print"Equal"

Ans. A=B=12/5
if A!=B:
print("Not equal")
6
else:
print("Equal")

b) number = input(‘Enter an integer”:)


if (number % 2 == 0):
print(number, “is an even number”)
Elif
print(number, “is an odd number”)

Ans. number = int(input(‘Enter an integer”:))


if (number % 2 == 0):
print(number, “is an even number”)
else:
print(number, “is an odd number”)

c) x = input(“Enter value”)
for k in range[0,20]
Print(x+k)

Ans. x = int(input(“Enter value”))


for k in range(0,20):
print(x+k)

Q27. Find the output of the following scripts:

a) year=2000 (1)
if year%100!=0 and year%4==0 or year%400==0:
print("Lp")
else:
print("Not Lp")

Ans. Lp

b) for x in range (2,8): (2)

if (x%2 !=0 and x%5!=0) :


print(x, end ="@")
else:
print(x, end ="#")
print (x)

Ans. 2#3@4#5#6#7@7

c) x=5 (2)
for k in range(0,10) :
7
if x==k:
print(x+k)
else:
print(x-k)
Ans : 5
4
3
2
1
10
-1
-2
-3
-4

d) for i in range(20): (2)


if(i%3!=0):
print("Bye",i)
Ans: Bye 1
Bye 2
Bye 4
Bye 5
Bye 7
Bye 8
Bye 10
Bye 11
Bye 13
Bye 14
Bye 16
Bye 17
Bye 19

e) x=6 (2)
for i in range(x):
if x==5:
break
print("H")
print(x)

Ans : H
H
H
H
H
H
6
8

You might also like