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
Night Snow Fall
By
Gayatri
Run
#run and see random balls appear r = rectangle(w=300,h=300,fill="black")+circle(r=20,fill="white",x=-100,y=100)+circle(r=30,fill=color(r=255, g=255, b=255, a=0.98),x=-100,y=100) r1 = rectangle(w=40,h=100,y=-100,x=-100,fill="orange",stroke="red",stroke_width=2)+rectangle(w=80,h=200,y=-100,x=-25,fill="pink",stroke="#cc088b",stroke_width=2)+rectangle(w=60,h=250,y=-80,x=50,fill="green",stroke="#10c42b",stroke_width=2)+rectangle(w=50,h=180,y=-100,x=110,fill="gold",stroke="orange",stroke_width=2) r2 = rectangle(w=10,h=10,y=-90,x=-110)+rectangle(w=10,h=10,y=-90,x=-90)+rectangle(w=10,h=10,y=-110,x=-110)+rectangle(w=10,h=10,y=-110,x=-90) r3 = rectangle(w=30,h=30,y=-70,x=-10)+rectangle(w=30,h=30,y=-70,x=-45)+rectangle(w=30,h=30,y=-110,x=-45)+rectangle(w=30,h=30,y=-110,x=-10) r4 = rectangle(w=35,h=35,y=-90,x=50)+rectangle(w=35,h=35,y=-10,x=50) r5 = rectangle(w=10,h=10,y=-90,x=100)+rectangle(w=10,h=10,y=-90,x=120)+rectangle(w=10,h=10,y=-110,x=100)+rectangle(w=10,h=10,y=-110,x=120)+rectangle(w=10,h=10,y=-50,x=100)+rectangle(w=10,h=10,y=-50,x=120) show(r,r1,r2,r3,r4,r5) def random_circle(): x = random(-150, 150) y = random(-150, 150) r = random(5) return circle(x=x, y=y, r=r,stroke="white",fill="white") for i in range(30): c = random_circle() show(c)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login