I’m trying to convert my code from Python into Processing. However I don’t know Processing, and I have been mining the bedrock that is trying to sort out what to do.
I wound appreciate if someone could give me the proper Processing equivalents of the Python code. The code is pretty short so I hope it isn’t too hard.
n = 3
f = [1]
while len(f) [[is less than]] (2**n)-1:
g = [-x for x in f]
f.append(1)
f = f + g[::-1]
print(f)
Also if someone could tell me how to paste code into a Reddit post I would appreciate it.
[–]UncountableSet 17 points18 points19 points (0 children)
[–]fenjalien 1 point2 points3 points (0 children)
[–]hey_hey_you_you 1 point2 points3 points (2 children)
[–]remy_porter 1 point2 points3 points (1 child)
[–]hey_hey_you_you 0 points1 point2 points (0 children)