QP - Xi CS Hy083 2024-25 Set-1
QP - Xi CS Hy083 2024-25 Set-1
QP - Xi CS Hy083 2024-25 Set-1
CLASS: XI
Time: 3 Hours M. Marks: 70
General Instructions:
SECTION A
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=int(input(“Enter a number”))
c=a+b
print ( b)
a. 13579
b. 2 4 6 8 10
c. 123456789
d. 246 8
b) “abc‟ * 3 d) “abc‟.lower()
b. 0, 8 and 16 respectively.
c. 2, 8 and 16 respectively.
d. 1, 8 and 16 respectively.
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.
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.
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
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
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:]