Answer to Question #169149 in Python for lia

Question #169149
Using python im trying to create a code that follows these specifications below

A Picologo program consists of zero or more commands ending with the x command. Any input following an x command is ignored. The Picologo commands sre processed in the order in which they appear.

Picologo programs may also contain blank, zero-length lines that should be skipped and do not otherwise affect processing of the Picologo program.

A nonblank line will contain exactly one Picologo command. A picologo command may be one of the following:

- b: moves the turtle backward 1 unit

- d: places the turtle's pen down

- f: moves the turtle forward 1 unit

- l: turns the turtle to the left by 1 degree

- r: turns the turtle to the right by 1 degree

- u: raises the turtle's pen up

- x: exits the Picologo program
1
Expert's answer
2021-03-05T10:18:05-0500
import turtle


turt = turtle.Turtle()


b = turt.backward(1)
d = turt.pendown()
f = turt.forward(1)
l = turt.left(1)
r = turt.right(1)
v = turt.penup()
x = turt.end_fill()

turtle.done()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS