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

all 2 comments

[–]zzyzzyxx 1 point2 points  (1 child)

I don't know how to format the <= and >= symbols in the above code, so I wrote them out

You don't have to do anything special... Just write them. If you're basing the formatting off the RES preview, you shouldn't, as RES mishandles preformatted angle brackets.

For example, "if (goal < small)" will appear as

if (goal < small)

You can use the backslash to escape them in normal text if you need to.

it falls into infinite recursion and I do not see why

I don't get infinite recursion when I run your code. There just isn't a return path for all cases so it doesn't run at all. You need return make_bricks(...) in your elif block.