Complete the code to define a function that adds two numbers.
def add_numbers(a, b): return a [1] b
The plus sign + adds two numbers together in Python.
Complete the code to create a class named Calculator.
class [1]: def __init__(self): pass
The class name should be Calculator to represent the object-oriented approach.
Fix the error in the method definition inside the class.
class Calculator: def [1](self, a, b): return a + b
The method name should be add to describe the action of adding numbers.
Fill both blanks to create an object and call its add method.
calc = [1]() result = calc.[2](5, 3)
We create an object of class Calculator and call its add method.
Fill all three blanks to convert a procedural add function into an object-oriented method call.
def [1](a, b): return a + b class Calculator: def [2](self, a, b): return a + b result1 = [3](4, 6) calc = Calculator() result2 = calc.add(4, 6)
The procedural function is named add_numbers, the method inside the class is add, and the procedural function is called as add_numbers(4, 6).
