+
*
-
All of the mentioned
0
1
-1
2
What will be the output of the following Python code?
print("xyyzxyzxzxyy".count('yy'))
error
none of the mentioned
print("ccdcddcd".find("c"))
4
Error
True
print('1Rn@'.lower())
n
1rn@
rn
r
seed()
sqrt()
factorial()
print()
(x**y)**z
(x**y) / z
(x**y) % z
(x**y)*z
What will be the output of the following Python expression?
print(round(4.5676,2))
4.5
4.6
4.57
4.56
What will be the output of the following Python function?
import math print(abs(math.sqrt(25)))
-5
5
5.0
sum(2,4,6) sum([1,2,3])
Error, 6
12, Error
12, 6
Error, Error
min(max(False,-3,-4), 2,7)
False
-3
-4
(a%b, a//b)
(a//b, a%b)
(a//b, a*b)
(a/b, a%b)
enumerate()
all()
chr()
max()
ord()
min()
any()
reverse(l)
list(reverse[(l)])
reversed(l)
list(reversed(l))
divmod()
float()
ord(‘ ‘)
ord(”)
ord(“”)
len(["hello",2, 4, 6])
3
6
number of arguments
number of arguments + 1
number of arguments – 1
def foo(k): k[0] = 1 q = [0] foo(q) print(q)
[0]
[1]
[1, 0]
[0, 1]