0% found this document useful (0 votes)
2 views

Computer Sc 24

The document is a sample mid-term examination paper for Class XI in Computer Science at G. D. Goenka Public School, Dwarka, covering various topics in Python programming. It consists of five sections with a total of 35 questions, including multiple-choice, short answer, and programming tasks. The exam is designed to assess students' understanding of Python concepts and their ability to write code.

Uploaded by

nksharit2007
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)
2 views

Computer Sc 24

The document is a sample mid-term examination paper for Class XI in Computer Science at G. D. Goenka Public School, Dwarka, covering various topics in Python programming. It consists of five sections with a total of 35 questions, including multiple-choice, short answer, and programming tasks. The exam is designed to assess students' understanding of Python concepts and their ability to write code.

Uploaded by

nksharit2007
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/ 4

G. D.

GOENKA PUBLIC SCHOOL, DWARKA


Mid Term - Sample Paper (2023-24)
CLASS: XI SUB: COMPUTER SCIENCE
Time allowed: 3 Hr. Maximum Marks: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each.
8. All programming questions are to be answered using Python Language only.

Section - A

Q1. Find the incorrect identifiers out of the following, which can be used for naming variable or functions is…. 1
a) down b) up c) out d) in
Q2. 2Consider a declaration A=int ("123") type of A is……………. 1
a) int b) float c) bool d) string
Q3. 3Which of the following is not a keyword? 1
a) eval b) INT c) float d) double
Q4. 4Consider the given expression: 1
8 >12 and 13 > 10
Which of the following is the correct value of the expression?
a) True b) False c) None d) NULL
Q5. 5Which of the following can be a variable? 1
a) and b) in c) it d) or
Q6. 6The ……………… statement forms the selection construct in Python. 1
a) If else if b) if c) For d) While
Q7. 7Choose correct option: 1
27=x
Statement 1: Above python code will generate error.
Statement 2: Variable name can come on RHS of assignment operator.
a) Only Statement 1 is true.
b) Only Statement 2 is true.
c) Both Statement 1 and 2 are true, but Statement 2 is not correct reasoning of Statement 1.
d) Both Statement 1 and 2 are true, but Statement 2 is correct reasoning of Statement 1.
Q8. 8What is the answer to this expression, print (22%3, 22//3, int (22/3)) is? 1
a) (1, 7, 7) b) 1, 7, 7 c) (1, 7, 7.3) d) error
Q9. x=3%4+1 1
y=4%3+1
x, y = x, y
print(x, y)
Q10. 9What is the value of the following expression: 8/4//2, 8//(4//2) 1
a) (1.0, 4.0) b) (1.0, 1.0) c) (1, 4) d) (1.0, 4)
Q11. 1Operators with the same precedence are evaluated in which manner? 1
0a) Left to Right b) Right to Left c) Can’t say d) None of the mentioned
Q12. 1Special meaning words of Pythons, fixed for specific functionality are called _______. 1
1a) Keywords b) Identifier c) Functions d) Literals
Q13. 1What type of error occurs when the following code is executed? 1
2Y=int(input(“Please enter a number”))
Please enter a number: Hello
a) Type Error b) Name Error c) Attribute Error d) Value Error
Q14. 1What will be the output of print(ord(‘B’)-ord(‘A)) 1
3a) 0 b) 1 c) -1 d) 2
Q15. 1Select the options that print : AAAAA 1
4a) print("A"+5) b) print("A"*5) c) print("A"**5) d) print(pow("A",5))
Q16. 1What is the output of the functions: round(63.8769,3) 1
5
Q17. 1Which of the following is not a complex number? 1
6a) k = 2 + 3j b) k = complex(2, 3) c) k = 2 + 3l d) k = 2 + 3J

Q18. 1Choose correct option: 1


7X=’Arya’
Y=’arya’
print(X==Y)
Statement 1: Output of above python code is False.
Statement 2: Python is a case-sensitive language.
a) Only Statement 1 is true.
b) Only Statement 2 is true.
c) Both Statement 1 and 2 are true, but Statement 2 is not correct reasoning of Statement 1.
d) Both Statement 1 and 2 are true, but Statement 2 is correct reasoning of Statement 1.
1 SECTION B
9
Q19. 2Mohit has written a code to input a positive integer and display its factorial. His code is having errors. 2
0Rewrite the correct code and underline the corrections made.
(factorial of a number n is the product 1x2x3. . .n)
n=int(input("Enter a positive integer: ")
f=0
for i in range(n):
f*=i
print(f)
Q20. 2Which statement consists of a logical operator? 2
2 a) a+b**c b) a >b: c) a and b not c d) 2 in a
b) a,b,c,d,e=6,5,4,2,3
R=e%c -b + a//d **d
print(R)
Q21. Write the following expression in python: 2
(i) √(𝑥 − 𝑦)2 + (𝑦 − 𝑧)2

−𝑏+√𝑏2 −4𝑎𝑐
(ii) 𝑥=
2𝑎
Q22. a) If value of x = 10, y = 20 find the value of R = (x != 10 and y == 20) 2
b) Give output:
print(“My” *3 + “life” +’7′)
Q23. 2Write the expression for the following 2
4

Q24. 2Write a program to input a year and check year is leap year or not. 2
5
Q25. 2 a) What is the difference between == and =? Explain with example 2
6 b) What is implicit and Explicit Conversions? Give examples also
SECTION C
Q26. Convert the following: 3
i) (4056)8 = ( )10
(ii) (106.06)10 = ( )2

Q27. Consider the following code segment: 3


a = int(input("Enter an integer: "))
b = int(input("Enter an integer: "))
if a <= 0:
b = b +1
else:
a=a+1
if a > 0 and b > 0:
print ("W")
elif a > 0:
print("X")
if b > 0:
print("Y")
else:
print("Z")
What letters will be printed if the user enters -1 for a and -1 for b?
Q28. Write a menu driven program that has options to accept the marks of the student in five major subjects in
class X and display the same
Calculate sum of marks of all subjects. Divide the total marks of all the subjects. Calculate percentage and
display the percentage.

Criteria Grade
Percentage>85 A
Percentage<85&&Percentage>=75 B
Percentage<75 && Percentage>=50 C
Percentage<30 && Percentage>=50 D
Percentage<30 Reappear
Q28. Write a program in python to calculate and print roots of a quadratic equation: 3
ax2 + bx +c = 0
Note: the program should take values of a, b, c and print if the roots are real, imaginary or equal

Q29. Write a program to input a number and test if it is prime or not 3


Q30. a) Write a program to print your name 5 times 3
b) Write a program to print sum of natural numbers.

SECTION D
Q31. a) Write a menu driven program to calculate sum, subtraction, multiplication and division. 5
b) Write a program to check number is even or odd
Q32. a) Rewrite following code fragment using While Loops 5
min=0
max=num
if num<0:
min=num
max=0
for i in range(min,max+1):
sum+=i
b) Find the output:
a, b = 5 , 3
for i in range(1,11,3):
a+=1
if a>5:
b+=3
print(a , " : ", b)
c) Write a program to print this pattern
*
**
***
****
*****

Q33. a) Write a program to check number is Armstrong or not 5


b) Write a Python program to calculate sum of the following series
(1)+(1+2)+(1+2+3)+….+(1+2+3+n)

SECTION E
Q34. a) for y in range (50,100,100): 4
print (“*”, y)
b) Find the output of the following program
a=110
while a>100:
print(a)
a-=2
c) Design a circuit to realise the following:
F(a,b,c)=AB+AC’+B’A’C

Q35. a) Write a program to print sum of the following s= 1+x2+x3……xn 4


b) What is the difference between for loop and while Loop?

You might also like