Question

In: Computer Science

Python: Using available in Pages turtle technique and, if you can, more advanced tricks, draw a...

Python: Using available in Pages turtle technique and, if you can, more advanced tricks, draw a FLOWER. Submit your result as text file.

Solutions

Expert Solution

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:)


Related Solutions

hi, can you draw me a cloud using turtle from python. please send me the codes
hi, can you draw me a cloud using turtle from python. please send me the codes
Write a function that draw your initials. (Using python 3 turtle) (T, S)
Write a function that draw your initials. (Using python 3 turtle) (T, S)
is it possible to have more than one ellipse on python turtle.
is it possible to have more than one ellipse on python turtle.
with python, create a fake logo for a company using turtle graphics
with python, create a fake logo for a company using turtle graphics
What would the Python code be to create the following working program using turtle: -Make 4...
What would the Python code be to create the following working program using turtle: -Make 4 turtles that are YELLOW, and 4 turtles that are GREEN. Create these turtles using one or more lists. -Make the yellow turtles start at a different randomized location somewhere on the left side of the screen within the range of (-100,100) and (0, -100) -Make the green turtles start at a different randomized location somewhere on the right side of the screen within the...
I need to draw my first name using Turtle. I am struggling with "P" and "A"...
I need to draw my first name using Turtle. I am struggling with "P" and "A" this is what I have import turtle turtle.setup(800, 700) window = turtle.Screen() window.reset() window.bgcolor('cornsilk') t = turtle.Turtle() t.color('blue') t.pencolor('red') t.turtlesize(6) t.speed(2) t.up() t.setposition(-50, 0) t.pendown()#Drawing letter T t.forward(40) t.back(20) t.right(90) t.forward(50) t.left(90) t.penup() t.forward(70) t.left(90) t.forward(25) t.pendown() t.circle(25)# Drawing letter O t.penup() t.left(180) t.forward(25) t.left(90) t.forward(10) t.pendown()#Drawing letter N t.left(90) t.forward(50) t.right(150) t.forward(60) t.left(150) t.forward(53) t.back(53) t.right(90) turtle.done()
How to make a python program that imports only turtle and math library where I can...
How to make a python program that imports only turtle and math library where I can click once on the screen to set the center of the square, move the mouse to define the edge-length of the square; click a second time to draw the square with the defined edge-length and center point?
PYTHON: Turtle Command Interpreter You will write a program that reads a sequence of codes, converts...
PYTHON: Turtle Command Interpreter You will write a program that reads a sequence of codes, converts them into Turtle commands, and then executes them. The codes are in a Python list, passed as an argument to your function. turtleRunner(t, x) t is a Turtle x is a list of Turtle commands Code List (f, d)    Move forward by d pixels u Lift pen up d Put pen down (l, d) Turn left by d degrees (r, d) Turn right...
Question: 4. Do you think the turtle (or more appropriately the Environmental group representing the turtle) could argue legal standing?
Case Study – Does a Turtle Have More Rights Than a Human?Resolving Controversial Environmental IssuesAs you have learned in the first chapter, you need to identify the issue, conclusion, and reasons when reading an article. Identifying the argument in the following essay will help you better understand and evaluate it.Ethical norms are ideas that guide our behavior. Everyone generally agrees that ethical norms are positive ways of behaving. Some examples of ethical norms are honest, cooperation, and individual responsibility.  If I...
Draw an American Flag in Python turtle Height A=1 Width B=1.9 Blue C=0.5385 D=0.76 Star Pattern...
Draw an American Flag in Python turtle Height A=1 Width B=1.9 Blue C=0.5385 D=0.76 Star Pattern E=F=0.0538 G=H=0.0633 Strips K=0.0633 L=0.0769
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT