Python. Just work in the def sierpinski. No output needed. Will give thumbs up for any attempt beginning this code.
I have tried to solve your question. I could not understand it clearly, but coded it till I understood. Since we are generating 100000 points the program might take a few seconds to run.
CODE:
###################################
import random
def sierpinski(p0, vs, f, inum):
curr = p0
pts_list = []
for i in range(inum):
pts_list.append(curr)
curr[0] = curr[0]+random.random()*f
curr[1] = curr[1]+random.random()*f
return pts_list
print(sierpinski([0,0], [[1,2,3], [1,2,3]], 0.5,
100000))
##################################
Python. Just work in the def sierpinski. No output needed. Will give thumbs up for any attempt beginning this code. Your task is to implement this algorithm in Python, returning a random collection of...
mperial Valley College PROJECT #3 You may work in groups of up to 4 students. Each group turns in one homework, wnitten on separate paper e,aat in tiny writing on this sheetl with llwri and all stens shoan doack All students in each group recee the same grade This assignment is due ot the begrring 덱 dass on"huidey July 27 (day of Find Exon This project is worth o total f 40points Homework will be graded not only on correctness,...