linkedin python技能测试题目

自己总结和找了一些linkedin Python技能测试的原题,一般15道测试题里有一半来自底下的题目。对着题目好好复习,好好查一查还是挺容易通过的。
懒得自己找答案和详细解析的可以参考这个链接: CSDN资源链接

1.What is an abstract class?

2.What happens when you use built-in function “any()” on a list?

3.What data structure does a binary tree degenerate to if it isn’t balanced properly?

4.What is a static method?

5.What are attributes?

6.What is the term used to describe this code? Count, fruit, price = (2, ‘apple’, 3.5)

7.What built-in method would you use to remove items from a list?

8.What is one of the most common uses of Python’s sys library?

9.What is a runtime of accessing a value in a dictionary by using its key?

10.What is the correct syntax of defining a class called Game?

11.What is a correct way to write a doctest?

12.What built-in python data type is commonly used to represent a stack?

13.What would this expression return?

14.How does “defaultdict” work?

15.What is the correct syntax for defining a class name “Game”, if it inherit from a parent class called “LogicGame”?

16.When would you use a “try/except” block?

17.Which of there is NOT a characteristic of “namedtuples”?

18.What is an instance method?

19.What would happen if you did not alter the state of the element that an algorithm is operating on recursive?

20.Which statement does NOT describe the object-orented programming concept of encapsulation?

21.What is the runtime complexity of searching for an item in a binary search tree?

22.What is the algorithmic paradigm of merge sort?

23.Why would you use a decorator?

24.Why would you use a mixin?

25.What is the runtime complexity of adding an item to a stack and removing an item from a stack?

26.What is the purpose of self keyword when defining or calling instance method?

27.Which choice is the most syntactically correct example of conditional branching?

28.What is the purpose of an if/else statement?

29.Which of the following is true about how numeric data would be organized in a binary search tree?

30.Running time of the code?

def my_print(a_list, b_list):  
	for a in a_list:  
	    for b in b_list:  
	        print(a, b) 

你可能感兴趣的:(python3)