Question
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’]
Posted under Python
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of the code shown below?
Hassan : June 26, 2023
https://data.stackexchange.com/enter preformatted text hereSelect 'StackApps' As [DatabaseName], AccountId, DisplayName, CreationDate From [StackApps]..Users fu WHERE fu.Reputation>200 UNION ALL
Similar Questions
Discover Related MCQs
Q. Write a list comprehension for producing a list of numbers between 1 and 1000 that are divisible by 3.
View solution
Q. What is the list comprehension equivalent for: list(map(lambda x:x**-1, [1, 2, 3]))
View solution
Q. Write a list comprehension to produce the list: [1, 2, 4, 8, 16……212].
View solution
Q. What is the list comprehension equivalent for:
{x : x is a whole number less than 20, x is even} (including zero)
View solution
Q. Which of the following matrices will throw an error in Python?
View solution
Q. Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is :
View solution
Q. To add a new element to a list we use which command ?
View solution
Q. To insert 5 to the third position in list1, we use which command ?
View solution
Q. To remove string “hello” from list1, we use which command ?
View solution
Q. Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5) ?
View solution
Q. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5) ?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Python? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!