Oct-20-2016, 10:43 PM
Okay, so this is my last try.
Im almost done, i just need to make this "start" int function properly.
I made it this far:
I think i came a lot longer on my own, so can you plz help me a bit here?
I've written what the function is supposed to do in the #symbol above the def compute() function.
best regards Malling
Im almost done, i just need to make this "start" int function properly.
I made it this far:
def step(rules, state): result=[] for x in state: if x==rules: result.append(state) else: result.append(x) flatten = [inner for outer in result for inner in outer] print(flatten) #this function description is to write a function compute(depth,rules,start) that uses the step function depth times to transform the list start into a list representing a fractal of depth depth. def compute(depth, rules, start): for i in range(depth): step("F",["F","L","F","R","F","L","F"]) compute(1,"F",["F","R"])the list "start" is not in use right now, and i just need some hints to what i can do.
I think i came a lot longer on my own, so can you plz help me a bit here?
I've written what the function is supposed to do in the #symbol above the def compute() function.
best regards Malling