human
I am working on the file "Lectures/Lecture_2/Jupyter_notebook_sheets/functions.ipynb".
The first task is:
Function states
Can you write Python program for it?
 Give me a the Python program you requested?
assistant
#Here is the Python program you requested.

from random import randrange

def randomly_odd_or_even_random_digit():
    odd = randrange(2)
    if odd:
        def random_odd_or_random_even_digit():
            return randrange(1, 10, 2)
    else:
        def random_odd_or_random_even_digit():
            return randrange(0, 10, 2)
    random_odd_or_random_even_digit.odd = odd
    return random_odd_or_random_even_digit

for i in range(10):
    random_odd_or_random_even_digit = randomly_odd_or_even_random_digit()
    if random_odd_or_random_even_digit.odd:
        print('Will be a random odd digit.... ', random_odd_or_random_even_digit())
    else:
        print('Will be a random even digit... ', random_odd_or_random_even_digit())