asked 149k views
2 votes
SOMEONE PLEASE HELP

I need to draw a stickfigure riding a skateboard in python

2 Answers

3 votes

Answer:

Answer:

Sure, I can provide some Python code that uses the `turtle` module to draw a stick figure riding a skateboard. Please note that this will be a very simplistic drawing.

```

import turtle

# Set up the screen

win = turtle.Screen()

win.bgcolor("white")

# Create a turtle to draw the skateboard

skateboard = turtle.Turtle()

skateboard.color("black")

# Draw the skateboard

skateboard.penup()

skateboard.goto(-50, -30)

skateboard.pendown()

skateboard.forward(100)

skateboard.right(90)

skateboard.forward(10)

skateboard.right(90)

skateboard.forward(20)

skateboard.left(90)

skateboard.forward(20)

skateboard.left(90)

skateboard.forward(60)

skateboard.left(90)

skateboard.forward(20)

skateboard.left(90)

skateboard.forward(20)

# Create a turtle to draw the stick figure

stickfigure = turtle.Turtle()

stickfigure.color("black")

# Draw the stick figure

stickfigure.penup()

stickfigure.goto(0, -20)

stickfigure.pendown()

stickfigure.circle(20) # Head

stickfigure.right(90)

stickfigure.forward(60) # Body

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.left(45)

stickfigure.forward(30) # Left arm

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.left(90)

stickfigure.forward(30) # Right arm

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.right(45)

stickfigure.forward(30)

stickfigure.right(30)

stickfigure.forward(30) # Left leg

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.left(60)

stickfigure.forward(30) # Right leg

Step-by-step explanation:

answered
User Rakhel
by
8.2k points
0 votes

Answer:

Sure, I can provide some Python code that uses the `turtle` module to draw a stick figure riding a skateboard. Please note that this will be a very simplistic drawing.

```

import turtle

# Set up the screen

win = turtle.Screen()

win.bgcolor("white")

# Create a turtle to draw the skateboard

skateboard = turtle.Turtle()

skateboard.color("black")

# Draw the skateboard

skateboard.penup()

skateboard.goto(-50, -30)

skateboard.pendown()

skateboard.forward(100)

skateboard.right(90)

skateboard.forward(10)

skateboard.right(90)

skateboard.forward(20)

skateboard.left(90)

skateboard.forward(20)

skateboard.left(90)

skateboard.forward(60)

skateboard.left(90)

skateboard.forward(20)

skateboard.left(90)

skateboard.forward(20)

# Create a turtle to draw the stick figure

stickfigure = turtle.Turtle()

stickfigure.color("black")

# Draw the stick figure

stickfigure.penup()

stickfigure.goto(0, -20)

stickfigure.pendown()

stickfigure.circle(20) # Head

stickfigure.right(90)

stickfigure.forward(60) # Body

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.left(45)

stickfigure.forward(30) # Left arm

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.left(90)

stickfigure.forward(30) # Right arm

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.right(45)

stickfigure.forward(30)

stickfigure.right(30)

stickfigure.forward(30) # Left leg

stickfigure.right(180)

stickfigure.forward(30)

stickfigure.left(60)

stickfigure.forward(30) # Right leg

turtle.done()

```

This Python script first draws a rough representation of a skateboard, then a stick figure standing on it. The stick figure consists of a circular head, a straight body, two arms, and two legs. Please note that this is a very simple representation, and the proportions might not be perfect. The `turtle` module allows for much more complex and proportional drawings if you need them.

answered
User Eric Dand
by
8.7k points

Related questions

asked Oct 13, 2024 1.7k views
Zauker asked Oct 13, 2024
by Zauker
7.4k points
1 answer
0 votes
1.7k views