Question
using repl.it
can you screenshot your repl.it please

Project 3. Draw a Snowman Write a program that uses turtle graphics to display a snowman as shown below. In this program you

image.png
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hi, Please check the code below and the snapshots of the output to understand the solution better. Comments are inserted as and where necessary.

Code:

# Python program to draw Snowman
# using Turtle Programming
import turtle
def draw_base():
turtle.speed(0)
turtle.penup()
turtle.setposition(0,-350)
turtle.pendown()
turtle.pensize(5)
turtle.circle(150)

def draw_mid_section():
turtle.penup()
turtle.setposition(0,-50)
turtle.pendown()
turtle.pensize(5)
turtle.circle(100)

def draw_head():
#head
turtle.penup()
turtle.setposition(0,150)
turtle.pendown()
turtle.pensize(5)
turtle.circle(78)
#right eye
turtle.penup()
turtle.setposition(-39,250)
turtle.pendown()
turtle.pencolor("red")
turtle.circle(5)
#left eye
turtle.penup()
turtle.setposition(39,250)
turtle.pendown()
turtle.circle(5)
#smile for snowman
turtle.penup()
turtle.setposition(-25,200)
turtle.pendown()
turtle.pencolor("blue")
turtle.forward(50)

def draw_arms():
turtle.pencolor("brown")
#draw left arm
turtle.penup()
turtle.setposition(-100,50)
turtle.pendown()
turtle.right(-160)
turtle.forward(70)
turtle.right(50)
turtle.forward(100)
turtle.left(30)
turtle.forward(20)
turtle.penup()
turtle.backward(20)
turtle.pendown()
turtle.right(50)
turtle.forward(20)

#draw right arm
turtle.penup()
turtle.setposition(100,50)
turtle.pendown()
turtle.left(-70)
turtle.forward(100)
turtle.right(25)
turtle.forward(20)
turtle.penup()
turtle.backward(20)
turtle.pendown()
turtle.left(50)
turtle.forward(20)

def Draw_hat():
turtle.fillcolor("red")
turtle.pencolor("blue")
turtle.penup()
turtle.setposition(-80,300)
turtle.pendown()
turtle.begin_fill()
turtle.goto(100,300)
turtle.goto(100,260)
turtle.goto(-80,300)
turtle.goto(-60,300)
turtle.goto(-60,340)
turtle.goto(80,340)
turtle.goto(80,300)
turtle.end_fill()
  
def main():
draw_base()
draw_mid_section()
draw_head()
draw_arms()
Draw_hat()
main()

# Python program to draw square, # using Turtle Programming import turtle def draw_base(): turtle.speed (0) turtle.penup(). t

Output:

Oda

PS: If you are satisfied with the answer, please take a couple of seconds to rate the answer. Thanks. If you do have any questions/comments, do let me know. I will be glad to help. :)

Add a comment
Know the answer?
Add Answer to:
using repl.it can you screenshot your repl.it please Project 3. Draw a Snowman Write a program...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Java program GCompound Practice Exercise CS141 Assignment Write a class that represents a digital snowman. Your...

    Java program GCompound Practice Exercise CS141 Assignment Write a class that represents a digital snowman. Your class should follow these guidelines: 1. Store the following private class variables bodyColor of type Color b. int x, int y for the upper left corner Graphics g. a. C. 2. Create two different constructor methods a. A (int x, int y, Graphics myG) parameter constructor that makes the snowman a light gray color by default and makes x and y the upper left...

  • Please help: For this project, you will create a shape drawing program using Turtle graphics. Your...

    Please help: For this project, you will create a shape drawing program using Turtle graphics. Your program will begin by asking the user how many points they would like to enter (# of vertices for the shape). Next, you will use a loop to input each X and Y coordinate and store these coordinates in lists. After inputting all of the coordinates, create a second loop that will draw and fill the shape using the coordinates that were entered. All...

  • WRITE A JavaFX APPLICATION THAT DRAWS A PICTURE OF A FLOWER. Use thick lines for stalks...

    WRITE A JavaFX APPLICATION THAT DRAWS A PICTURE OF A FLOWER. Use thick lines for stalks and rotated ellipses for petals. Put the sky and the ground as background. Don’t worry artistic quality, it should look simple. It should take about 45 to 75 statements. Also, have some line-by-line documentation that says what is going on, e.g., // draw petal // draw ground // draw leaf The snowman program should be used as a GUIDE. Snowman code : import javafx.application.Application;...

  • Please help with this python turtle problem using the functions provided. Python Turtle Write a program...

    Please help with this python turtle problem using the functions provided. Python Turtle Write a program using the turtle module to draw the face of a clock that looks like the image below. You will need to use the turtle module for this exercise as well as the bgcolor), shape(), color), penup), right(), forward(), pendown(), and stamp() functions. The code below can be removed or changed as needed. import turtle t turtle.Turtle0 t.forward(75)

  • Write a program called draw_shapes.py. In your program, Create a block header with: your name the...

    Write a program called draw_shapes.py. In your program, Create a block header with: your name the date a short description of what the program does: Assignment 5: Draw shapes using turtle Import the turtle module. Create a window and screen (canvas) where your turtle will draw. Make the window 400 pixels wide x 400 pixels high and give it an indigo background and a title of "Shapes". Use this code to create a window object: # a place for the...

  • i would like a C++ program please Write a program using void functions to draw a...

    i would like a C++ program please Write a program using void functions to draw a house by printing characters to the screen. . Your main should look like below Printintersectingo: Ildraw the roof • PrintHorizontalo: f/draw the base of the roof . PrintParallell) draw the sides of the house . PrintHorizontali): /draw the base of the house Hint: Use void functions Writo function that calculatos tho standard deviation of 3 intogor young and

  • using the website repl.it (must be done in Javascript) PGM #1 Write a Java program that can perform the Caesar cipher fo...

    using the website repl.it (must be done in Javascript) PGM #1 Write a Java program that can perform the Caesar cipher for English messages that include both upper and lowercase alphabetic characters. The Caesar cipher replaces each plaintext letter with a different one, by a fixed number of places down the alphabet. The cipher illustrated here uses a left shift of three, so that (for example) each occurrence of E in the plaintext becomes B in the ciphertext. For example...

  • Please use JAVA Create an additional drawing panel at least 400 x 400. On it, draw...

    Please use JAVA Create an additional drawing panel at least 400 x 400. On it, draw filled-in shapes of at least two types (rectangles, circles, etc.) in at least two colors. Each shape type should be drawn by its own method (that you write) with parameters indicating where it is to be drawn and how big it is to be. Consider including the color as a parameter as well; this would make the function more flexible. Draw at least ten...

  • Please use JAVA Create an additional drawing panel at least 400 x 400. On it, draw filled-in shap...

    Please use JAVA Create an additional drawing panel at least 400 x 400. On it, draw filled-in shapes of at least two types (rectangles, circles, etc.) in at least two colors. Each shape type should be drawn by its own method (that you write) with parameters indicating where it is to be drawn and how big it is to be. Consider including the color as a parameter as well; this would make the function more flexible. Draw at least ten...

  • In C++ syntax please Write a program that implements and demonstrates a linked list using functions....

    In C++ syntax please Write a program that implements and demonstrates a linked list using functions. Your program should first dehne a node that stores an integer and then your program will include the following functions appendo- This function accepts the head pointer (by reference) of a linked list and an integer as it's only arguments. It then creates a node, stores the integer argument in the node, and adds it to the end of the list. findo-This function accepts...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT