What is the output of print(math.copysign(3, -1))?
Deduce the output of the following code:
x=12
y=6
z=x,y
print(type(z))
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?
x = 1, 2, 3, 4
print(sum(x))
print(sum(1, 2, 3, 4))
What type of values does a complex data type contain?
1
3
fp=open("filename.txt")
a=0
for i in fp:
a+=a
print(a)
If the file filename.txt contains 34 lines, 199 characters of text then, what is the output of the above code?
What will be the output of the following Python code?
- >>>t = (1, 2, 4, 3, 8, 9)
- >>>[t[i] for i in range(0, len(t), 2)]
A counter-controlled loop in which the counter is assigned a constant or a value is known as which of the following types of loops?
3
4
What will be the output of the following Python code?
a = {3, 4, 5}
a.update([1, 2, 3])
print(a)
1
3
4
Pick the correct statement regarding pickle and marshal modules.
1
2
3
4