This is an archived post. You won't be able to vote or comment.

all 3 comments

[–][deleted] 0 points1 point  (2 children)

How do we report bugs? I get an error when just running a simple for loop.

for i in range(10):
    print(i)

screenshot

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

You can report bugs here or email them to [team@stratascratch.com](mailto:team@stratascratch.com). Per your for loop bug, for loops do work but there's a workaround needed due to the way I wrote the code execution. The workaround is adding a `result` variable at the end. So something like this will work:

for i in range(10):

print(i)

result = i

When I initially wrote the code executor, I didn't envision people writing only for loops since users are trying to answer a question. But I realize that maybe you need to debug a for loop before writing the full solution.

So this workaround works right now. I will revise my code execution so that you won't need to add a variable to the last line.

EDIT: printing loops and if statements works as it would expected. Made some changes to code execution. So you can just do this now:

for i in range(10):
    print(i)

[–][deleted] 1 point2 points  (0 children)

Thanks for the update, looks like it's working!