OXALISS INTERNATIONAL SCHOOL (CBSE),
THATCHUR.
Computer Science (083)
Class: XII Session: 2025-26
CLASS TEST – WORKING WITH FUNCTIONS
Date : 21.07.2025 Max. Marks: 10
SECTION – A
1. Consider the following code and write the flow of execution for this. Line 2
numbers have been given for your reference.
1. def power(b, p):
2. y = b ** p
3. return y
4.
5. def calcSquare(x):
6. a = power(x, 2)
7. return a
8.
9. n = 5
10. result = calcSquare(n)
11. print(result)
2. What will be the output of the following Python code? 2
S="WELC0ME"
def Change(T):
T="HELLO"
print(S, end='@')
Change(S)
print(S)
3. What is the output of the following code snippet? 3
def ChangeVal(M,N):
for i in range(N):
if M[i]%5 == 0:
M[i]//=5
if M[i]%3 == 0:
M[i]//=3
L = [25,8,75,12]
ChangeVal(L,4)
for i in L:
print(i,end="#")
4. What will be the output of the following Python code ? 3
def FunStr ( S ) :
T=“”
for i in S :
if i.isdigit ( ):
T=T+i
return T
X = “ PYTHON 39 “
Y = FunStr ( X )
print ( X , Y, sep=” * ” )
*****************ALL THE BEST******************