In: Computer Science
Python: Using available in Pages turtle technique and, if you can, more advanced tricks, draw a FLOWER. Submit your result as text file.
Drawing a FLOWER using Python
import turtle
def draw_rhombus(turtle,size , small_angle):
for i in range(2):
turtle.forward(size)
turtle.right(small_angle)
turtle.forward(size)
turtle.right((360-2*small_angle)//2)
def draw_flower(turtle, size , angle):
for i in range(360//angle):
draw_rhombus(turtle , size,15)
turtle.right(angle)
turtle.right(90)
turtle.forward(size*3)
canvas = turtle.Screen() //Open the screen
canvas.colormode(255)
canvas.bgcolor("lightblue") //Backgorund color of the screen
bruce = turtle.Turtle("turtle")
bruce.color("red") //Color of the folwer
bruce.speed(800)
draw_flower(bruce , 100 ,5)
Output will be given below
Python Turtle Graphics
This is the code if you have doubts comment down below and give Thumbup.
Thank You:)