@ArnavPoddar/

Drawing

Python (with Turtle)

No description

fork
loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import turtle
wn = turtle.Screen()

babbage = turtle.Turtle()
babbage.shape("diamond")

move_speed = 5
turn_speed = 13


def forward():
  babbage.forward(move_speed)

def backward():
  babbage.backward(move_speed)

def left():
  babbage.left(turn_speed)

def right():
  babbage.right(turn_speed)

wn.onkey(forward, "Up")
wn.onkey(backward, "Down")
wn.onkey(left, "Left")
wn.onkey(right, "Right")
wn.listen()
result
console