0% found this document useful (0 votes)
36 views

slip test - functions outputbased

CBSE CLASS 12 OUTPUT BASED QUESTIONS

Uploaded by

gomathi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

slip test - functions outputbased

CBSE CLASS 12 OUTPUT BASED QUESTIONS

Uploaded by

gomathi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

OXALISS INTERNATIONAL SCHOOL (CBSE), THATCHUR.

Computer Science (083)


Class: XII Session: 2024-25
SLIP TEST – WORKING WITH FUNCTIONS
Date : 18.07.2024 Max. Marks: 20
SECTION – A
1. keyword is used to define a function 1
2. Write statement to call the function. 1
def Add(X,Y):
Z = X+Y
return Z
#statement to call the above function
print(“Total =”,C)
3. Call the given function using KEYWORD ARGUMENT with values 100 1
and 200
def Swap(num1,num2):
num1,num2=num2,
num1
print(num1,num2)
Swap( , )
4. What will be the output of following code? 1
def Calculate(A,B,C):
return A*2, B*2, C*2
val = Calculate(10,12,14)
print(type(val))

OXALISS INTERNATIONAL SCHOOL (CBSE), THATCHUR.


Computer Science (083)
Class: XII Session: 2024-25
SLIP TEST – WORKING WITH FUNCTIONS
Date : 18.07.2024 Max. Marks: 20
SECTION – A
1. keyword is used to define a function 1
2. Write statement to call the function. 1
def Add(X,Y):
Z = X+Y
return Z
#statement to call the above function
print(“Total =”,C)
3. Call the given function using KEYWORD ARGUMENT with values 100 1
and 200
def Swap(num1,num2):
num1,num2=num2,
num1
print(num1,num2)
Swap( , )
4. What will be the output of following code? 1
def Calculate(A,B,C):
return A*2, B*2, C*2
val = Calculate(10,12,14)
print(type(val))
SECTION – B
5. What will be the output of following 2 B=30
code? A = Updater(A,B)
def Alter(M,N=50): print(A,'#',B)
M=M+N B = Updater(B)
N=M-N print(A,'#',B)
print(M,"@",N) A = Updater(A)
return M print(A,'$',B)
A=200 7. What will be the output of following 2
B=100 code?
A = Alter(A,B) def Fun1(mylist):
print(A,"#",B) for i in range(len(mylist)):
B = Alter(B) if mylist[i]%2==0:
print(A,‟@‟,B) mylist[i]/=2
6. What will be the output of 2 else:
following code? mylist[i]*=2
def Updater(A,B=5):
A = A // B list1 =[21,20,6,7,9,18,100,50,13]
B=A%B Fun1(list1) print(list1)
print(A,'$',B)
return A + B
A=100

*****************ALL THE BEST******************

SECTION – B
5. What will be the output of following 2 B=30
code? A = Updater(A,B)
def Alter(M,N=50): print(A,'#',B)
M=M+N B = Updater(B)
N=M-N print(A,'#',B)
print(M,"@",N) A = Updater(A)
return M print(A,'$',B)
A=200 7. What will be the output of following 2
B=100 code?
A = Alter(A,B) def Fun1(mylist):
print(A,"#",B) for i in range(len(mylist)):
B = Alter(B) if mylist[i]%2==0:
print(A,‟@‟,B) mylist[i]/=2
6. What will be the output of 2 else:
following code? mylist[i]*=2
def Updater(A,B=5):
A = A // B list1 =[21,20,6,7,9,18,100,50,13]
B=A%B Fun1(list1) print(list1)
print(A,'$',B)
return A + B
A=100
*****************ALL THE BEST******************

You might also like