What is the output of print(math.trunc(‘3.1’))?
A. 3
B. 3.0
C. error
D. none of the mentioned
Answer:A
What is the output of print(math.trunc(‘3.1’))?
A. 3 B. 3.0 C. error D. none of the mentioned
Explanation: TypeError, a string does not have __trunc__ method.