What is the output of print(round(3.14159, 2)) in Python?
print(round(3.14159, 2))
Correct answer
B. 3.14
B. 3.14
round(x, 2) rounds to two decimal places.
Asked in: Python Interview Data Types
https://docs.python.org/3/library/stdtypes.htmlNot sure why the answer is B? Ask here and get an explanation.