F: Programming bugs (errors)

Introduction

Bugs
The following programs do not work as they have bugs (errors)
Your task is to run the programs in the IDLE editor and debug so that the programs can run

Use the cheatsheet to help you debug
cheatsheet-python-grok

Task 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mport turtle # allows us to use the turtles library
   wn = turtle.Screen() # creates a graphics window
alex = turtle.Turtle() # create a turtle named alex
alex.forward(150) # tell alex to move forward by 150 units
alex.left(90) # turn by 90 degrees
alex.forward(75
<h3>Task 2</h3>
[cc lang="python"]
import turtle
window = turtle.Screen()
window.bgcolor("green") #background color
tom = turtle.Turtle()
tom.forward(100)
tom.left(120)
tom.forward(100)

[cc lang=”python”]