[go: up one dir, main page]

0% found this document useful (0 votes)
10 views4 pages

Class 11 Computer Science Sample Paper

This document is a half-yearly sample question paper for Class XI in Computer Science, covering various topics related to Python programming. It consists of 37 questions divided into five sections, with varying marks assigned to each section. The paper includes multiple-choice questions, programming tasks, and theoretical questions, all requiring answers in Python.

Uploaded by

harshit914015
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)
10 views4 pages

Class 11 Computer Science Sample Paper

This document is a half-yearly sample question paper for Class XI in Computer Science, covering various topics related to Python programming. It consists of 37 questions divided into five sections, with varying marks assigned to each section. The paper includes multiple-choice questions, programming tasks, and theoretical questions, all requiring answers in Python.

Uploaded by

harshit914015
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

GANGA NATIONAL PUBLIC SCHOOL

PARSA BHADWARIYA, SIDDHARTHNAGAR


Half-Yearly Sample Question Paper
(SESSION: 2025-26)
Class: XI Time: 3:00 Hrs.
Subject: Computer Science (083) MM: 70
General Instructions:
● This question paper contains 37 questions.
● All questions are compulsory. However, internal choices have been provided in some
questions. Attempt only one of the choices in such questions
● The paper is divided into 5 Sections- A, B, C, D and E.
● Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
● Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
● Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
● Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
● Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
● All programming questions are to be answered using Python Language only.
● In case of MCQ, text of the correct answer should also be written.

Section - A
1. In which year was Python first released?
a) 1989 b) 1991
c) 1995 d) 2000
2. Which of the following paradigms does Python not support?
a) Procedural programming b) Object-oriented programming
c) Functional programming d) None of the mentioned
3. Does Python distinguish between uppercase and lowercase in variable names?
a) Yes b) No
c) Only for keywords d) Machine dependent
4. What is the standard file extension for Python scripts?
a) .py b) .pyc
c) .pyt d) .python
5. How does Python use whitespace to structure code blocks?
a) Braces { } b) Parentheses ()
c) Indentation d) Semicolons ;
6. Lists in Python are mutable, meaning they can be changed after creation.
a) True b) False
7. Which of the following represents a multi-line string in Python?
a) "hello world" b) '''helloworld'''
c) 'hello\nworld' d) Both b and c
8. What is the output of the following code?
print(type(10 // 3))
a) <class 'int'> b) <class 'float'>
c) <class 'str'> d) <class 'bool'>
9. Predict the output-
for i in range(2, 11, 3):
print(i, end=" ")
a) 2 5 8 b) 2 5 8 11
c) 3 6 9 d) 2 4 6 8 10
10. What does the 'continue' statement do in a Python loop?
a) Ends the loop entirely
b) Skips the current iteration and proceeds to the next
c) Restarts the loop from the start
d) Exits the program
11. What will be the output of the following code?
x = 15
if x < 10:
print("x is small")
elif x >= 15:
print("x is large")
else:
print("x is medium")
a) x is small b) x is large
c) x is medium d) No output
12. Which of the following is an invalid variable name in Python?
a) myVar b) _var
c) 3var d) var_3
13. What is the output of the following code?
print(3 ** 2 ** 2)
a) 81 b) 36
c) 27 d) 81
14. What will be the output of the following code?
for i in range(4):
if i == 2:
break
print(i, end=" ")
a) 0 1 2 3 b) 0 1
c) 0 1 2 d) 0 1 3
15. Which function from the math module returns the square root of a number?
a) math.sqrt() b) math.pow()
c) math.floor() d) math.ceil()
16. What will be a possible output for the following code –
import random
print(random.randrange(50, 100, 10))
a) 50 b) 60
c) 90 d) All of these
17. Which of the following is a valid numeric literal in Python?
a) “5280” b) 3.14.15
c) 123_456 d) 0xF5
18. Which of the following is the correct way to import the math module?
a) import math b) include math
c) from math import all d) use math
19. Which function converts an integer to a float?
a) float() b) str()
c) int() d) number()
Q20 and Q21 are Assertion(A) and Reason(R) based questions. Mark the correct choice as:
a) Both A and R are True and R is the correct explanation for A.
b) Both A and R are True and R is not the correct explanation for A.
c) A is True but R is False.
d) A is False but R is True.
20. Assertion (A): Python is dynamically typed.
Reason (R): Variable types are determined at runtime.
21. Assertion (A): Loops in Python can be used for repetition.
Reason (R): The while loop executes as long as a condition is true.
Section - B
22. What are Python keywords? Give two examples.
23. Identify errors in the following code. Rewrite the corrected code and underline the
corrections:
a = input("Enter number: ")
b = input("Enter number: ")
sum = a + b
print sum
24. What will be the output of the following:
x = 20
y=3
print(x / y)
print(x % y)
print(x // y)
print(x ** y)
25. Differentiate between mutable and immutable data types in Python.
OR
Explain Python's dynamic typing with an example.
26. What are literals in Python? List any two types.
OR
What do you mean by operators? Give an example of arithmetic operators.
27. Write a Python code to print all even numbers from 10 to 50.
OR
Write a Python code to calculate the product of first 10 natural numbers.
28. Predict the output of the following code:
word = "python"
for char in word:
print(char)
Section - C
29. Differentiate between if and while statements in Python.
30. Write a program to generate a random float between 1.0 and 10.0.
OR
Write a program to take input in inches and convert it to centimeters.
For example: input = 5 inches
Output = 12.7 centimeters
31. Explain the while loop with an example.
Section – D
32. Consider the following code and answer the questions:
import math
print(math.pi)
print(type(math.pi))
print(4 in [1,2,3,4])
print(math.ceil(3.4))
33. Write a program to print the following pattern using nested loops:
* * * * *
* * * *
* * *
* *
*
34. Write a Python program to find the sum of digits of an inputted integer.
OR
Write a program to enter numbers until the user enters 0. Display the count of positive
numbers entered after loop termination.
35. Describe membership and identity operators with examples.
OR
Explain the following:
a. Math Module b. Statements
Section - E
36. Aryan is a class 11 student learning Python. He wants to check if a number is even or
odd. He has written partial code as follows:
n = ______________#Statement 1
if ______________:#Statement 2
print("Even")
else:
print("Odd")
a) Statement 1 - Input n as integer.
b) Statement 2 - Check if n is divisible by 2 using modulus.
Complete the code by filling in the blanks.

37. Write the Python programs for the following:


a. Write a program that calculates the area of a circle. The program should prompt the
user to enter the radius and then display the calculated area using math module.
b. Write a program that takes a list of numbers as input and returns the mean using
statistics module.
For example, if the input is [1,2,3,4], the program should return "Mean is 2.5".

You might also like