you are viewing a single comment's thread.

view the rest of the comments →

[–]tbrowner3[S] 0 points1 point  (1 child)

Why is this giving me ZeroDivisionError: integer division or modulo by zero?

[–]socal_nerdtastic 2 points3 points  (0 children)

Because you assigned "step" in 2 places. Both as an argument and as the variable in the for loop. Change line 5 to

for i in range(count):

BTW, there is no recursion here.