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

What will be the output of the following Python code?
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’]
D. [‘3.1’, ‘3.14’, ‘3.142’, ‘3.1416’, ‘3.14159’]
 

Tìm kiếm

Back
Top