To find the shortest path in a graph with non-negative edge weights, the ____ algorithm can be used.

  • Binary
  • Bubble
  • Dijkstra's
  • Quick
To find the shortest path in a graph with non-negative edge weights, you can use Dijkstra's algorithm. This algorithm efficiently calculates the shortest path from a source vertex to all other vertices in a weighted graph.

To get all the keys from a Python dictionary, you can use the ____ method.

  • get()
  • items()
  • keys()
  • values()
To obtain all the keys from a Python dictionary, you should use the keys() method. This method returns a view object that displays a list of all the keys in the dictionary.

To represent a constant property in a Python class, you would typically use _____.

  • const
  • final
  • readonly
  • static
In Python, to represent a constant property in a class, you would typically use the readonly keyword. It ensures that the property cannot be modified after it's assigned a value.

The _____ method in a metaclass is executed when a new class is created.

  • class
  • init
  • metaclass
  • new
In Python, the __new__ method in a metaclass is executed when a new class is created. It allows you to customize the creation process of classes before __init__ is called.

The _____ method in Python is used to delete the object and perform the cleanup activities.

  • del
  • delete
  • destruct
  • finalize
In Python, the finalize method is used to perform cleanup activities and delete an object. This method is called automatically by the garbage collector before reclaiming the memory used by the object.

Python's ____ allows classes to be created dynamically, at runtime.

  • decorators
  • inheritance
  • metaclasses
  • polymorphism
Python's "metaclasses" allow classes to be created dynamically, at runtime. Metaclasses are responsible for creating and configuring classes.

The ____ algorithm is commonly used to dynamically optimize and solve overlapping subproblems.

  • Backtracking
  • Divide and Conquer
  • Dynamic Programming
  • Greedy
The Dynamic Programming algorithm is commonly used to dynamically optimize and solve overlapping subproblems. It stores the results of subproblems to avoid redundant computation.

The ____ algorithm is used to traverse all the vertices of a graph in depthward motion.

  • A*
  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Dijkstra's
The Depth-First Search (DFS) algorithm is used to traverse all the vertices of a graph in a depthward motion. It explores as far as possible along each branch before backtracking.

The ____ attribute in a class is used to define its metaclass.

  • __class__
  • __init__
  • __meta__
  • __metaclass__
The __class__ attribute in a class is used to define its metaclass. It is assigned the metaclass when the class is defined.

The ____ attribute in a Matplotlib Axes object represents the y-axis.

  • get_yaxis
  • set_y
  • set_y_axis
  • y_axis
In Matplotlib, the get_yaxis attribute represents the y-axis of an Axes object. This attribute allows you to access and modify properties of the y-axis, such as tick locations and labels.