Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

QP - Xi CS Hy083 2024-25 Set-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

KENDRIYA VIDYALAYA EMBASSY OF INDIA KATHMANDU

HALF YEARLY EXAMINATION (2024-2025) SET-1


SUBJECT: COMPUTER SCIENCE (083)

CLASS: XI
Time: 3 Hours M. Marks: 70

General 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 (1 to 18). Each question carries 1 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.
• Section 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.
• All programming questions are to be answered using Python Language only.

SECTION A

1. Which of the following is a valid data type in Python?


a) date b) float c) varchar d) Letter

2. What will the following expression be evaluated to in Python?


2**2**2
a) 16 b) 128 c) 64 d) 8

3. State True or False for the following statement:


“Python is a low-level language”
4. Consider the following logic gate diagram

What must be the value of x for which the above diagram is accurate?
a) 1 b) 0 c) both a and b
5. 1 KB of data is equivalent to

a) 1024 bits b) 220 bytes c) 2-10 Mb d) 213 bits

6. IDLE stands for:


a. Information Development Logic Environment

b. Interaction Development Logic Environment

c. Integrated Development and Learning Environment

d. Interaction Developer and Logic Environment


7. The following code produces an error:

a=int(input(“Enter a number”))

c=a+b

print ( b)

What is the name of the error?

a. Name Error b. Undefined Error c. Type Error d. Syntax Error

8. Select the correct output for the following code:

a. 13579
b. 2 4 6 8 10
c. 123456789
d. 246 8

9. Study the following statement:


>>>”a”+ “bc”
What will be the output of this statement?
(A) a+bc
(B) abc
(C) abc
(D) a

10. Which of the following is not a Python legal string operation:

a) “abc‟ + “def‟ c) “abc‟ + 3

b) “abc‟ * 3 d) “abc‟.lower()

11. Which of the following is a wrong pair of application and category?


a. WhatsApp: General Purpose software
b. Gmail: Customised software
c. Python: Free and Open-Source software
d. MS Word: Proprietary software

12. Fill in the blank

is a language translator which reads a program line-by-line when run.


a. Compiler b. Assembler c. Transmitter d. Interpreter
13. By default, the values of range () in the for loop start from:
(A) -1
(B) 0
(C) 1
(D) 10

14. The base values of binary, octal and hexadecimal are

a. 10, 80 and 160 respectively.

b. 0, 8 and 16 respectively.

c. 2, 8 and 16 respectively.

d. 1, 8 and 16 respectively.

15. Convert ----- (101100001110)2=( )8

16 Ram wanted to make a program which takes in two numbers from the user and print
the two numbers as shown below:
Input: Enter number 1=>23
Enter number 2=>24
Output: 23.0, 24.0
He wrote the following code but doesn’t know what the last line is supposed to be
a=float(input(“Enter number 1=>‟))
b=float(input(“Enter number 2=>‟))
... ... ... … …. … …. ….
What would be the last line of his code which produces his desired output?
a. print(a+b)
b. print(a,b)
c. print('a', ', ', 'b')
d. print(a,b,sep=', ')

The following questions 17 and 18 are Assertion-Reasoning based, answer the questions by
choosing one of the following responses:
a. Both A and R are true and R is the correct explanation of A.
b. Both A and R are true but R is not the correct explanation of A.
c. A is true but R is false.
d. A is false but R is true.
17. Assertion (A): The pow() function in Python can be used to calculate the square root of
a number.
Reason (R): The pow() function can raise a number to a fractional power, which can be
used to calculate square roots.

18. Assertion (A): Variables are not containers in Python


Reason (R): Variables in Python don't directly store the data but they reference objects
in memory
SECTION B
19. Rewrite the following operations in a syntax as prescribed in Python:

OR
Discusses the role of RAM in the System? Write the difference between SRAM and DRAM
20. Krishna wrote the following code to input a number and check whether it is a prime
number or not. His code is having errors. Rewrite the correct code and underline the
corrections made.
ch=True
n=int(input("Enter number to check=")
for i in range (2, n//2+1):
if n%i=0:
ch=False
break
else:
ch=True
If ch=True:
Print("Number is prime")
else
Print("Number is not prime")
21. What do you mean by Booting process? Differentiate between cold boot and warm boot?
OR
What will be the output of the following code ?
for num in range(2,10,2):
s=0
print(num,end=’@’)
s=s+num
print(“sum=”,s)

22 Define a Python function def F2C(): to get temperature in Fahrenheit as input from
the user and convert temperature from Fahrenheit to Celsius.
Use formula C =5x( F -32) /9
23 Write the output of the following code:

i.

ii. What will be the output of the following code?


x, y =2, 5
x, y =y, x+2
print(x, y)

24 Define identifiers. Identify the valid and invalid identifiers in the following list.
i) x_y125z ii) _abc@5 iii) abc_d53 iv) break
25 Write a program in python to obtain three numbers and print their sum and average.
SECTION C
26 Define operators in python. Explain and differentiate between relational and logical
operators with example.

27 Write a program to find and print the grade of a student when the user inputs their
percentage. Grades are allocated as given in the table below:
28 Write a python program to find out the greatest of three user defined numbers.
OR
Write a program in python to enter a number and print whether it is an Armstrong
number or not. (Note: An Armstrong number is a number that is equal to the sum of its digits raised to the power of
the number of digits. For example, in the case of three-digit numbers, an Armstrong number like 153 can be calculated

as 13+53+33=15313+53+33=153. Other examples include 0, 1, 370, 371, and 407.)

29. Write a program that inputs a word and prints back the word without the vowels. E.g.
if the word is “kendriya” then output should be “kndry‟.
30. i. Explain the difference between the primary and secondary memories? What is the
need of RAM? How does it differ from ROM?
31. ii. Expand the following:
(a) ASCII (b) MICR (c) BCD (d) BOSS
OR

i. Write Boolean expression of the given logical gate?


ii. Explain the Associative law with the help of truth table.
SECTION D
31 Explain Bug & its different types in python with an example of python program.
32. Write a menu driven program to implement a simple calculator in python. The program
reads two integer values and provides choice for the user to perform Addition,
Subtraction, multiplication,and division operations on those values. The program
continuously gives choice for the user to perform the above operations till the user select
exit option.
SECTION E
33. Write the output of the following code:
i. a,b,c=10,20,30
p,q,r=c–5,a+3,b–4
print(“a,b,c:”, a,b,c, end= “”)
print(“p,q,r:”, p,q,r)

ii. (a,b)=(10,5)
print(a/b)
print(a//b)
print(a%b)
print(a**2)
iii. for i in range(1,5):
for j in range(1,2*i+1):
print(“*‟,end=‟‟)
print()

iv. a=20
b=10
a//=b
print(c+2/2)

v. for i in range(1,5):
for j in range(i):
print('*',end=' ')
print()

34. (a). Convert the following while loop in to for and guess the output.

i=100
while(i>0):
print(i)
i-=3
(b) Write a program in python to print all-natural numbers up to a number N which
are divisible by 3.(value of N should be taken from the user during run time of the
program)
(c) Write a program by defining a function def count(s), where s is a string type
argument, to count and print total numbers of vowels, consonants ,total alphabets,
total digits and numbers of words in the given string.
.
35. Evaluate the following statements& write the output :
S1=“SWACHHATA HI”
S2 = “SEWA HAI ”
(i) S1 [1:3]
(ii) S1[2] + S2 [:2]
(iii) S1 + S2[-1]
(iv) S1 [:3] + S1 [3:]
(v) S2[:-1] + S2 [-1:]

You might also like