Question

Write a program that implements the pseudocode in python by using turtle like below: Repeat 45...

Write a program that implements the pseudocode in python by using turtle like below:

Repeat 45 times:
        Walk forward 100 steps
        Turn right 92 degrees
        Walk forward 10 steps
        Turn right 92 degrees
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please refer the attached code screenshot for proper indentation.

Code::

import turtle

#turtle object for drawing on
#screen created automatically
t = turtle.Turtle()

for i in range(0,45):
#draws 100 pixels in direction pointer is facing
t.forward(100)
#moves the pointer to the right by 92 degrees
t.right(92)
#draws 10 pixels in direction pointer is facing
t.forward(10)
#moves the pointer to the right by 92 degrees
t.right(92)

Output::

Python Turtle Graphics

Code Screenshot::

import turtle turtle object for drawing on #screen created automatically t - turtle.Turtle ) for i in range (0,45) #draws 100

If you have any doubt, please feel free to ask.

Thank you.

Add a comment
Know the answer?
Add Answer to:
Write a program that implements the pseudocode in python by using turtle like below: Repeat 45...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT