0% found this document useful (0 votes)
7 views1 page

Slip Test - Functions

This document is a Class XII Computer Science test for OXALISS International School, focusing on functions in Python. It includes questions on code execution flow, expected outputs of given code snippets, and function behavior. The test is scheduled for July 21, 2025, with a maximum score of 10 marks.

Uploaded by

gomathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Slip Test - Functions

This document is a Class XII Computer Science test for OXALISS International School, focusing on functions in Python. It includes questions on code execution flow, expected outputs of given code snippets, and function behavior. The test is scheduled for July 21, 2025, with a maximum score of 10 marks.

Uploaded by

gomathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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******************

You might also like