- Which built in function returns the length of an object?
View Answer
Correct answer: A — len()
- What will be printed?
1 python 2 print(len("Eduinq")) View Answer
Correct answer: A — 6
- Which built in function returns the sum of elements?
View Answer
Correct answer: A — sum()
- What is the output of print(sum([1,2,3]))?
View Answer
Correct answer: A — 6
- Which built in function returns the maximum value?
View Answer
Correct answer: A — max()
- What will be printed?
1 python 2 print(max([1,5,3])) View Answer
Correct answer: A — 5
- Which built in function returns the minimum value?
View Answer
Correct answer: A — min()
- What is the output of print(min("Eduinq"))?
View Answer
Correct answer: A — E
- Which built in function converts to integer?
View Answer
Correct answer: A — int()
- What will be printed?
1 python 2 print(int("5")+2) View Answer
Correct answer: A — 7
- Which built in function converts to float?
View Answer
Correct answer: A — float()
- What is the output of print(float("3.5"))?
View Answer
Correct answer: A — 3.5
- Which built in function converts to string?
View Answer
Correct answer: A — str()
- What will be printed?
1 python 2 print(str(123)+"Eduinq") View Answer
Correct answer: A — 123Eduinq
- Which built in function converts to boolean?
View Answer
Correct answer: A — bool()
- What is the output of print(bool(""))?
View Answer
Correct answer: A — False
- Which built in function returns absolute value?
View Answer
Correct answer: A — abs()
- What will be printed?
1 python 2 print(abs(-10)) View Answer
Correct answer: A — 10
- Which built in function returns power?
View Answer
Correct answer: A — pow()
- What is the output of print(pow(2,3))?
View Answer
Correct answer: A — 8
- Which built in function returns rounded value?
View Answer
Correct answer: A — round()
- What will be printed?
1 python 2 print(round(3.14159,2)) View Answer
Correct answer: A — 3.14
- Which built in function returns sorted list?
View Answer
Correct answer: A — sorted()
- What is the output of print(sorted([3,1,2]))?
View Answer
Correct answer: A — [1,2,3]
- Which built in function returns reversed iterator?
View Answer
Correct answer: A — reversed()
- What will be printed?
1 python 2 print(list(reversed("Eduinq"))) View Answer
Correct answer: A — ['q','n','i','u','d','E']
- Which built in function returns enumeration?
View Answer
Correct answer: A — enumerate()
- What is the output of below code?
1 python 2 for i,v in enumerate("Eduinq"): 3 if i==0: print(v) View Answer
Correct answer: A — E
- Which built in function returns zipped iterator?
View Answer
Correct answer: A — zip()
- What will be printed?
1 python 2 print(list(zip([1,2],[3,4]))) View Answer
Correct answer: A — [(1,3),(2,4)]
- Which built in function applies function to iterable?
View Answer
Correct answer: A — map()
- What is the output of below code?
1 python 2 print(list(map(str,[1,2,3]))) View Answer
Correct answer: A — ['1','2','3']
- Which built in function filters iterable?
View Answer
Correct answer: A — filter()
- What will be printed?
1 python 2 print(list(filter(lambda x:x>2,[1,2,3,4]))) View Answer
Correct answer: A — [3,4]
- Which built in function returns all attributes of object?
View Answer
Correct answer: A — dir()
- What is the output of print("Eduinq".dir()==dir("Eduinq"))?
View Answer
Correct answer: A — True
- Which built in function returns documentation?
View Answer
Correct answer: A — help()
- What will be printed?
1 python 2 print(help(len)) View Answer
Correct answer: A — Documentation string
- Which built in function returns object type?
View Answer
Correct answer: A — type()
- What is the output of print(type(5))?
View Answer
Correct answer: A — <class 'int'>
- Which built in function checks instance?
View Answer
Correct answer: A — isinstance()
- What will be printed?
1 python 2 print(isinstance("Eduinq",str)) View Answer
Correct answer: A — True
- Which built in function checks subclass?
View Answer
Correct answer: A — issubclass()
- What is the output of print(issubclass(bool,int))?
View Answer
Correct answer: A — True
- Which built in function returns unique id of object?
View Answer
Correct answer: A — id()
- What will be printed?
1 python 2 x = "Eduinq" 3 print(id(x)!=0) View Answer
Correct answer: A — True
- Which built in function returns hash value?
View Answer
Correct answer: A — hash()
- What is the output of print(hash("Eduinq")!=0)?
View Answer
Correct answer: A — True
- Which built in function evaluates expression?
View Answer
Correct answer: A — eval()
- What will be printed?
1 python 2 print(eval("2+3")) View Answer
Correct answer: A — 5