McqMate
Sign In
Hamberger menu
McqMate
Sign in
Sign up
Home
Forum
Search
Ask a Question
Sign In
McqMate Copyright © 2025
→
Computer Science Engineering (CSE)
→
Python Programming
→
What is the output of the following code...
Q.
What is the output of the following code : print 9//2
A.
4.5
B.
4.0
C.
4
D.
Error
Answer» C. 4
2.3k
0
Do you find this helpful?
15
View all MCQs in
Python Programming
Discussion
No comments yet
Login to comment
Related MCQs
What is the output of the following program? import sys L1 = tuple() print(sys.getsizeof(L1), end = " ") L1 = (1, 2) print(sys.getsizeof(L1), end = " ") L1 = (1, 3, (4, 5)) print(sys.getsizeof(L1), end = " ") L1 = (1, 2, 3, 4, 5, [3, 4], 'p', '8', 9.777, (1, 3)) print(sys.getsizeof(L1))
What is the output of the following program? L = [1, 3, 5, 7, 9] print(L.pop(-3), end = ' ') print(L.remove(L[0]), end = ' ') print(L)
What is the output of the following piece of code? #mod1 def change(a): b=[x*2 for x in a] print(b) #mod2 def change(a): b=[x*x for x in a] print(b) from mod1 import change from mod2 import change #main s=[1,2,3] change(s)
What is the output of the following program : i = 0 while i < 3: print i print i+1
What is the output of the following program : i = 0 while i < 3: print i i += 1 else: print 0
What is the output of the following program : i = 0 while i < 5: print(i) i += 1 if i == 3: break else: print(0)
What is the output of the following program? T = (1, 2, 3, 4, 5, 6, 7, 8) print(T[T.index(5)], end = " ") print(T[T[T[6]-3]-6])
What is the output of the following program? from math import sqrt L1 = [x**2 for x in range(10)].pop() L1 + = 19 print(sqrt(L1), end = " ") L1 = [x**2 for x in reversed(range(10))].pop() L1 + = 16 print(int(sqrt(L1)))
What is the output of the following code? def foo(k): k[0] = 1 q = [0] foo(q) print(q)
What is the output of the following code? def foo(fname, val): print(fname(val)) foo(max, [1, 2, 3]) foo(min, [1, 2, 3])