Explore
Courses
Batches
Sketches
Statistics
Code a Pookkalam
Jobs
Devsprint
People
Course Creation
Create a Course
Guidelines
Resources
Support
Blogs
My Profile
About Us
Login
Sketches
0
rangoli with function
By
ARJUN
Run
def diamond(size): p1=point(x=0,y=2*size) p2=point(x=2*size,y=0) p3=point(x=0,y=-2*size) p4=point(x=-2*size,y=0) shape=polygon([p1,p2,p3,p4]) return (shape) def rangoli(R): c = circle(x=0,y=0,r=R) d = diamond(R/2) s = rectangle(x=0,y=0,w=R,h=R) c1 = circle(x=0,y=0,r=R/2) d1 = diamond(R/4) s1 = rectangle(x=0,y=0,w=R/2,h=R/2) return (c+d+s+c1+d1+s1) r=rangoli(100) show(r)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login