0% found this document useful (0 votes)
52 views2 pages

Class XII UT 1 CS Set B

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)
52 views2 pages

Class XII UT 1 CS Set B

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/ 2

D.T.E.A SR.

SEC SCHOOLs, New Delhi


Periodic Test- I July 2024
Time:- 50 minutes Class XII- Computer Science(083) Set A Marks:- 20
General Instructions:
1. This question paper contains five sections, Section A to C.
2. All questions are compulsory.
3. Section A has 12 questions carrying ½ mark each.
4. Section B has 04 Very Short Answer type questions carrying 02 marks each.
5. Section C has 02 Short Answer type questions carrying 03 marks each.

Section A
1. What is the output of following code:
T=(100)
print(T*2)
2. Identify the output of the following Python statements.
lst1 = [10, 15, 20, 25, 30]
lst1.insert( 3, 4)
lst1.insert( 2, 3)
print (lst1[-5])
3. Find output of the following Python code?
def add (num1, num2):
sum = num1 + num2
sum = add(20,30)
print(sum)
4. State True or False: “In a Python program, if a break statement is given in a nested
loop, it terminates the execution of all loops in one go.”
5. What will be the output of the following statement:
print(3-2**2**3+99/11)
6. Find the correct output of the code:

7. Find the correct output of the code:


def my_func(var1=100, var2=200):
var1+=10
var2 = var2 - 10
return var1+var2
print(my_func(50),my_func())
8. ________ keyword is used to define a function.
9. The variable declared inside a function is called a global variable.
10. Function can alter only mutable data types.
11. Consider the given expression:
not True and False or True
What will be the correct output if the given expression is evaluated?
12. State True or False “Variable declaration is implicit in Python.”
Section B
13. Write the output of the code given below
p=5
def sum(q,r=2):
global p
p=r+q**2
print(p, end= '#')
a=10
b=5
sum(a,b)
sum(r=5,q=1)
14. Write the output of the code given below
tuple1 = (11, 22, 33, 44, 55 ,66)
list1 =list(tuple1)
new_list = [ ]
for i in list1:
if i%2==0:
new_list.append(i)
new_tuple = tuple(new_list)
print(new_tuple)
15. Write a python program to remove duplicates from a given list:-
a=[10,20,30,20,10,50,60,40,80,50,40]
16. Write a program to calculate the length of a string:”python program”

Section C
17. Write a function listcharge(Arr) in python, which accepts a list of numbers and
replace each even number by value 10 and multiply odd number by 5.
Where a=[10,20,23,45]
listchange(a)
Output:- [10,10,115,225]
18. Write a function str_reverse() to reverse a string
Sample string: “python123”
Expected output:- “321nohtyp”

You might also like