Vidyalelo
Python · Q56

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 56

Q56

What will be the output of the following Python code? import math [str(round(math.pi)) for i in range (1, 6)]

A.
['3', '3', '3', '3', '3', '3']
B.
['3.1', '3.14', '3.142', '3.1416', '3.14159', '3.141582']
C.
['3', '3', '3', '3', '3']
Answer
D.
['3.1', '3.14', '3.142', '3.1416', '3.14159']

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board