Class - 12 CBSE Computer Science Important Output Questions 2025
Python Functions
What is the output of following code fragments ?
def increment(n): n.append([49]) return n[0], n[1], n[2], n[3] L = [23, 35, 47] m1, m2, m3, m4 = increment(L) print(L) print(m1, m2, m3, m4) print(L[3] == m4)
View Answer4 Likes
Python Functions
What will be the output of the following Python code ?
V = 25 def Fun(Ch): V = 50 print(V, end = Ch) V *= 2 print(V, end = Ch) print(V, end = "*") Fun("!") print(V)
- 25*50!100!25
- 50*100!100!100
- 25*50!100!100
- Error
View Answer10 Likes
Python Funda
What are variables ? How are they important for a program ?
View Answer59 Likes
Python Functions
What will be the output of the following program?
num = 1 def myfunc(): global num num = 10 print (num) print (myfunc()) print (num)
View Answer1 Likes
Python Functions
What will be the output of the following program?
def display(): print ("Hello",) display() print("bye!")
View Answer3 Likes
Python Functions
Predict the output of the following code:
a = 10 y = 5 def myfunc (a) : y = a a = 2 print ("y=",y, "a=", a) print ("a+y", a + y) return a + y print ("y=",y, "a=", a) print (myfunc (a)) print ("y=", y, "a=", a)
View Answer2 Likes
Python Functions
Predict the output of the following code.
def code(n): if n == 0: print ( 'Finally' ) else: print (n) code (3) code (15)
View Answer1 Likes
Python Functions
Predict the output of the following code.
def code (n) : if n==0: print('Finally') else: print(n) code (2-2) code (15)
View Answer2 Likes
Python Functions
Predict the output of the following code.
def code(n): if n == 0: print(' Finally') else: print (n) code (10)
View Answer1 Likes
Python Functions
Predict the output of the following code.
def code (n) : if n==0: print ( 'Finally' ) else: print (n) print (n-3) code (10)
View Answer2 Likes
Showing 51 - 60 of 98 Questions