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

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()
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...
I need to write these three functions in Python using turtle module. def line(t, coord1, coord2)...
I need to write these three functions in Python using turtle module. def line(t, coord1, coord2) t is a turtle object passed in coord1 and coord2 are 2-element lists that represent x, y coordinates draws a line from coord1 to cord2 def poly(t, *coords) t is a turtle object passed in *coords is any number of x, y coordinates each as a 2-element list draws a polygon based on coords (will close off polygon by drawing a line from last...
Your (turtle) program in python must include: Create four Red turtles and four Blue turtles using...
Your (turtle) program in python must include: Create four Red turtles and four Blue turtles using one or more lists. • Start each of the Red turtles at a different random location on the left side of the screen within the range of the square formed by (-100, 100) and (0, -100) and each of the Blue turtles at a random location on the right side of the screen within the range of the square formed by (0, 100) and...
Write a function that plots the following trajectory equations using python turtle graphics. x = v*sin(A)*t...
Write a function that plots the following trajectory equations using python turtle graphics. x = v*sin(A)*t y = v*cos(A)*t -.5*(9.8)*t**2 Loop through t starting at 0 and increment by .1 until y<=0. (hint, while loop) Experiment with values of velocity V (1 to 20) and angle A (0 to 90) that gives you a good plot that does not go off the screen. Position the start of the plot at the left bottom of the screen
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