Tutorial 03

Steps:

  1. Generate the list of odd numbers between 1 to 10 using list comprehension

  2. Develop a test function using a generator of numbers to test the Calculator class

  3. Create a division by zero check decorator: @check_dbz

Example of a generator function:

def test_number_generator(start, stop):
    n = start
    while n < stop:
        yield n+1, n
        n += 1