- What is an abstract class?
- What happens when you use the build-in function any() on a list?
- What data structure does a binary tree degenerate to if it isn’t balanced properly?
- What statement about static methods is true?
- What are attributes?
- What is the term to describe this code?
- What built-in list method would you use to remove items from a list?
- What is one of the most common use of Python’s sys library?
- What is the runtime of accessing a value in a dictionary by using its key?
- What is the correct syntax for defining a class called Game?
- What is the correct way to write a doctest?
- What built-in Python data type is commonly used to represent a stack?
- What would this expression return?
- How does defaultdict work? (Duplicate 1)
- How does defaultdict work? (Duplicate 2)
- What is the correct syntax for defining a class called “Game”, if it inherits from a parent class called “LogicGame”?
- What is the purpose of the “self” keyword when defining or calling instance methods?
- Which of these is NOT a characteristic of namedtuples?
- What is an instance method?
- Which choice is the most syntactically correct example of the conditional branching? (Duplicate 1)
- Which choice is the most syntactically correct example of the conditional branching? (Duplicate 2)
- Which statement does NOT describe the object-oriented programming concept of encapsulation?
- What is the purpose of an if/else statement?
- What built-in Python data type is commonly used to represent a queue?
- What is the correct syntax for instantiating a new object of the type Game?
- What does the built-in map() function do?
- If you don’t explicitly return a value from a function, what happens?
- What is the purpose of the pass statement in Python?
- What is the term used to describe items that may be passed into a function?
- Which collection type is used to associate values with unique keys?
- When does a for loop stop iterating?
- Assuming the node is in a singly linked list, what is the runtime complexity of searching for a specific node within a singly linked list?
- Given the following three list, how would you create a new list that matches the desired output printed below?
- What happens when you use the built-in function all() on a list?
- What is the correct syntax for calling an instance method on a class named Game? (Duplicate 1)
- What is the correct syntax for calling an instance method on a class named Game? (Duplicate 2)
- What is runtime complexity of the list’s built-in .append() method?
- What is key difference between a set and a list?
- What is the definition of abstraction as applied to object-oriented Python?
- What does this function print?
- Correct representation of doctest for function in Python
- Suppose a Game class inherits from two parent classes: BoardGame and LogicGame. Which statement is true about the methods of an object instantiated from the Game class?
- What does calling namedtuple on a collection type return?
- What symbol(s) do you use to assess equality between two elements?
- Review the code below. What is the correct syntax for changing the price to 1.5?
- What value would be returned by this check for equality?
- What does a class’s init() method do?
- What is meant by the phrase “space complexity”?
- What is the correct syntax for creating a variable that is bound to a dictionary?
- What is the proper way to write a list comprehension that represents all the keys in this dictionary?
- What is the algorithmic paradigm of quick sort?
- What is the purpose of the self keyword when defining or calling methods on an instance of an object?
- What statement about a class methods is true?
- What does it mean for a function to have linear runtime?
- What is the proper way to define a function?
- According to the PEP 8 coding style guidelines, how should constant values be named in Python?
- Describe the functionality of a deque.
- What is the correct syntax for creating a variable that is bound to a set?
- What is the correct syntax for defining an __init__() method that takes no parameters?
- Which statement about the class methods is true?
- Which of the following is TRUE About how numeric data would be organised in a binary Search tree?
- Why would you use a decorator?
- When would you use a for loop?
- What is the most self-descriptive way to define a function that calculates sales tax on a purchase?
- What would happen if you did not alter the state of the element that an algorithm is operating on recursively?
- What is the runtime complexity of searching for an item in a binary search tree?
- Why would you use mixin?
- What is the runtime complexity of adding an item to a stack and removing an item from a stack?
- Which statement accurately describes how items are added to and removed from a stack?
- What is a base case in a recursive function?
- Why is it considered good practice to open a file from within a Python script by using the with keyword?
- Why would you use a virtual environment?
- What is the correct way to run all the doctests in a given file from the command line?
- What is a lambda function ?
- What is the primary difference between lists and tuples?
- Which statement about static method is true?
- What does a generator return?
- What is the difference between class attributes and instance attributes?
- What is the correct syntax of creating an instance method?
- What is a key difference between a set and a list?
- What is the correct way to call a function?
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.