Skip to content

Conversation

MrRishabhAnand
Copy link

No description provided.

Copy link

@christianbender christianbender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Work! I have some requests.

b = 1
for i in range(num):
a,b = b, a+b
return b-a

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is a bug. You must indent properly the return.

for i in range(num): a,b = b, a+b return b-a
a,b = b, a+b
return b-a

def fibrange(self, start, stop, fast=True):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use list compreshion:

if not fast: fib_range = [self.iteration(i) for i in range(start,stop)] return fib_range else: fib_range = [self.formula(i) for i in range(start,stop)] return fib_range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants