"""
Created By: Alex J. Gatz
Date: 06/07/2018

This is some code playing with the usage of a python 
"Generator" which is really very cool. Another use case
I want to play with is properly ordering installation of
packages to ensure that if there are dependencies that they are installed in the proper order. 

Created a recursive fibonacci function.
"""

# Fibonacci generator
def fibonacci(n): 
    a, b, counter = 0, 1, 0 
    while True: 
        if (counter > n): 
            return 
        yield a 
        a, b = b, a + b 
        counter += 1 

# How many values donyou want?
f = fibonacci(30) 

# Iterate multiple calls of the fibonacci generator
for x in f: 
    print(x, " ", end="")

e9237e5f9d0a4b6b7ad4f87a68738c8ceb5f0a49
<mask token>

<mask token>


def fibonacci(n):
    a, b, counter = 0, 1, 0
    while True:
        if counter > n:
            return
        yield a
        a, b = b, a + b
        counter += 1


<mask token>

<mask token>


def fibonacci(n):
    a, b, counter = 0, 1, 0
    while True:
        if counter > n:
            return
        yield a
        a, b = b, a + b
        counter += 1


<mask token>
for x in f:
    print(x, ' ', end='')

<mask token>


def fibonacci(n):
    a, b, counter = 0, 1, 0
    while True:
        if counter > n:
            return
        yield a
        a, b = b, a + b
        counter += 1


f = fibonacci(30)
for x in f:
    print(x, ' ', end='')

"""
Created By: Alex J. Gatz
Date: 06/07/2018

This is some code playing with the usage of a python 
"Generator" which is really very cool. Another use case
I want to play with is properly ordering installation of
packages to ensure that if there are dependencies that they are installed in the proper order. 

Created a recursive fibonacci function.
"""

# Fibonacci generator
def fibonacci(n): 
    a, b, counter = 0, 1, 0 
    while True: 
        if (counter > n): 
            return 
        yield a 
        a, b = b, a + b 
        counter += 1 

# How many values donyou want?
f = fibonacci(30) 

# Iterate multiple calls of the fibonacci generator
for x in f: 
    print(x, " ", end="")
