Skip to content

[python3] about_iteration.py  #117

@Ashtar

Description

@Ashtar

So there's this function in about_iteration.py which is supposed to calculate a number from the Fibonacci sequence, judging from the name of the variable. But instead it just adds up the numbers in range (1,6):

def test_iterators_are_a_type(self):
    it = iter(range(1,6))

    fib = 0

    for num in it:
        fib += num

    self.assertEqual(__ , fib)

So fib = 0 + 1 + 2 + 3 + 4 + 5 = 15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions