Function to return to bottom of torso

Assignment Help History
Reference no: EM132146758

So my professor asked us to program a "stick figure" in python turtle, which I did but my program is not working. He wants us to repeat and/or randomize elements from the current "stick figure" program which I don't know how to do. The important thing is that the picture should look different each time you run it and there should be multiple components that change. The whole picture that you created as in turtle can repeat with different settings Parts of a big picture can repeat with different settings, e.g., the whole picture could represent a scene with different random elements. Etc. Like distance, color or position

import turtle

screen = turtle.screen()

screen.setup(500,500)

my_turtle = turtle.Turtle()

#function to draw circle head with radius 50

def draw_head():

 my_turtle.circle(50)

 my_turtle.right(90)

# function to draw torso, lift pen up, then move to middle of torso

def draw_torso():

 my_turtle.forward(150)

 my_turtle.pu()

 my_turtle.backward(75)

 my_turtle.right(135)

# function to put pen down, draw left arm at 45 degrees, then return to middle of torso

def draw_left_arm():

 my_turtle.pd()

 my_turtle.forward(50)

 my_turtle.right(45)

 my_turtle.forward(10)

 my_turtle.pu()

 my_turtle.backward(10)

 my_turtle.left(90)

 my_turtle.pd()

 my_turtle.forward(10)

 my_turtle.pd)

 my_turtle.forward(10)

 my_turtle.pu()

 my_turtle.backward(10)

 my_turtle.left(135)

 my_turtle.forward(50)

 my_turtle(90)

# function to put pen down, draw right arm at 45 degrees, return to middle of torso, turn right 135 dgrees to face down

def draw_right_arm():

 my_turtle.pd()

 my_turtle.forward(50)

 my_turtle.left(45)

 my_turtle.forward(10)

 my_turtle.pu()

 my_turtle.backward(10)

 my_turle.right(90)

 my_turtle.pu()

 my_turtle.backward(10)

 my_turlte.right(135)

 my_turtle.forward(50)

 my_turtle.left(45)

# function to move to bottom of torso, put pen down left leg at 45 dgrees facing, down then lift pen up

def draw_left_leg():

 my_turtle.forward(75)

 my_turtlel.right(45)

 my_turtle.pd()

 my_turtle.forward(50)

 my_turtle.pu()

 my_turtle.backward(50)

# function to return to bottom of torso, put pen down, draw right leg at 45 degrees facing down

def draw_right_leg():

 my_turtle.left(90)

 my_turtle.pd()

 my_turtle.foward(50)

#function that calls all of the above functions

def draw_stick_figure():

 draw_head()

 draw_torso()

 draw_left_arm()

 draw_right_arm()

 draw_left_leg()

 draw_right_leg()

draw_stick_figure()

Reference no: EM132146758

Questions Cloud

Develop a records inventory survey : Develop a Records Inventory Survey Form that you are going to use in surveying the departmental unit(s) you have identified above. The purpose for your survey.
Write program to write each card : Write program to write each card in a deck of 52 playing cards to a text file. Your program should write the rank (Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen,
One night shift worker prior experiences with poetry slams : One night shift worker's prior experiences with poetry slams bring what leadership substitute to Frappacup?
Explanation of two considerations about receiving : Post an explanation of two considerations about receiving and releasing information about people who could be considered human and social services clients
Function to return to bottom of torso : So my professor asked us to program a "stick figure" in python turtle, which I did but my program is not working. He wants us to repeat and/or randomize
Create the physical data model for the logical data model : Create the physical data model for the logical data model that you submitted in IP3. This should include all of the data definition language SQL.
What operating system choices are available : Operating System: With the recommended hardware, what operating system choices are available and which would be best? Why?
Eigrp supports both ipv4 and ipv6 : 1- EIGRP supports both IPv4 and IPv6. 2- EIGRP hello and hold timers between neighbors need to be identical to successfully establish EIGRP neighbor relationshi
Technique performs differently than the traditional method : Determine if the technique performs differently than the traditional method. Assume the population distribution is approximately normal.

Reviews

Write a Review

History Questions & Answers

  History of imperialism and colonialism

Discuss the specific connections between economic development and imperialism in the latter half of the 20th century.

  Explain immigration to america

Explain immigration to America during the half of 19 th century

  American society in the making

American Society in the Making

  Conditions of late 19th century worker

Some historians considered the industrialists of the late 19th Century to be captains of industry while others considered them robber barons. Which view do you believe to be correct and why.

  Explaining the transition of humankind

Explain the significance of the transition of humankind from a hunter-gatherer society to a food-producing society. Include the following: A description of the Paleolithic era

  Tombs and monuments

Tombs and Monuments: Compare an aspect of the tomb of Emperor Shihuangdi with the burial tombs of other cultures, such as Egypt or Mesopotamia. Explain whether you think the emperor's elaborate tomb was motivated by power or religious beliefs.

  Accomplishments of egyptian female

Can anyone educate me regarding one distinct Mesopatamian and one Egyptian female and their accomplishments?

  Describing the characteristics of mesopotamia

What are the characteristics of the first civilizations of 5000 years ago? Especially in Mesopotamia.

  Explaining the vulnerability of mesopotamia

Determine why Mesopotamia was so vulnerable.

  Difference between egypt and mesopotamia

Some have said that the strength and endurance of the Empire and the regular, dependable recurrence of the Nile flood gave the artists-craftsmen a sense of consistency that profoundly influenced the nature of their artistic creations.

  Characteristics of first civilizations

What are the characteristics of the first civilizations of 5000 years ago( especially in the Mesopotamia)? what makes these groups "civilized" as opposed to prehistoric peoples?

  Growth and change in society

Cultures of Mesopotamia, especially Summer, and Egypt. How cultures change over time.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd