MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Python
Python Developer
Quiz 1
1
2
3
4
5
6
7
8
9
10
Q.1
What does the function math.frexp(x) return?
a) a tuple containing the mantissa and the exponent of x
b) a list containing the mantissa and the exponent of x
c) a tuple containing the mantissa of x
d) a list containing the exponent of x
Q.2
What is the result of math.fsum([.1 for i in range(20)])?
a) 2.0
b) 20
c) 2
d) 2.0000000000000004
Q.3
What is the result of sum([.1 for i in range(20)])?
a) 2.0
b) 20
c) 2
d) 2.0000000000000004
Q.4
What is returned by math.isfinite(float(‘inf’))?
a) True
b) False
c) None
d) error
Q.5
What is returned by math.isfinite(float(‘nan’))?
a) True
b) False
c) None
d) error
Q.6
What is x if x = math.isfinite(float(‘0.0’))?
a) True
b) False
c) None
d) error
Q.7
What will be the output of the following Python code? >>> -float('inf') + float('inf')
a) inf
b) nan
c) 0
d) 0.0
Q.8
What will be the output of the following Python code? print(math.isinf(float('-inf')))
a) error, the minus sign shouldn’t have been inside the brackets
b) error, there is no function called isinf
c) True
d) False
Q.9
What is the value of x if x = math.ldexp(0.1)?
a) 1
b) 2.0
c) 0.5
d) none of the mentioned
Q.10
What is returned by math.modf(1.0)?
a) (0.0, 1.0)
b) (1.0, 0.0)
c) (0.5, 1)
d) (0.5, 1.0)
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page