188k views
1 vote
Can someone turn this into pseudo code plz I don’t understand

import turtle

def main():

t = turtle.Turtle()

speed = input(" Fast or Slow? ")
if(speed == "y"):
goFast(t)
else:
goSlow(t)

def goFast(t):
t.speed(50)
def goSlow(t):
t.speed(5)

color = input(" whats better red or yellow for red say r for yellow say y ")
if(color == "y"):
drawSquarer(t)
else:
drawSquare(t)

roofColor = input(" What color you want your roof red or yellow? ")
if(roofColor == "red"):
redRoof(t)
else:
yellowRoof(t)

def drawSquare(t):
# square color red

t.color("red")

for side in range(4):

t.forward(100)

t.left(90)

def drawSquarer(t):
# square color yellow

t.color("yellow")

for side in range(4):

t.forward(100)

t.left(90)

#drawroof color red
def redRoof(t):
t.color("red")
t.penup()
t.setpos(0, 100)
t.pendown()
t.left(40)
t.forward(71)
t.right(85)
t.forward(71)

#drawroof color red

def yellowRoof(t):
t.color("yellow")
t.penup()
t.setpos(0, 100)
t.pendown()
t.left(40)
t.forward(71)
t.right(85)
t.forward(71)

main()

1 Answer

5 votes
It’s too long to do now but I’ll give u the steps to follow;

1)• arrange the steps in other of decreasing importance (from where to start to where to end)

2)• take each step and divide it into sub-steps. NB: Make sure the sub-steps are as simplified as possible.
User LogicLooking
by
6.1k points