What Will Be The Output Of The Following Python Codep Pre #432
What will be the output of the following Python code?</p> <pre><code class="language-python">import math [str(round(math.pi)) for i in range (1, 6)]</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 List Comprehension - Python List Comprehension - Quiz No.2.
What will be the output of the following Python code?
import math [str(round(math.pi)) for i in range (1, 6)]
[‘3’, ‘3’, ‘3’, ‘3’, ‘3’, ‘3’]
[‘3.1’, ‘3.14’, ‘3.142’, ‘3.1416’, ‘3.14159’, ‘3.141582’]
[‘3’, ‘3’, ‘3’, ‘3’, ‘3’]
[‘3.1’, ‘3.14’, ‘3.142’, ‘3.1416’, ‘3.14159’]