Question

Using Turtle Graphics, add a graphical design of any Food item of your choice This is...

  • Using Turtle Graphics, add a graphical design of any Food item of your choice

This is a python programming turtle question

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the code below:

import turtle
def drawGrapes(branchLen,t):
if branchLen > 5:
t.forward(branchLen)
t.right(20)
drawGrapes(branchLen-15,t)
t.left(40)
drawGrapes(branchLen-15,t)
t.right(20)
t.backward(branchLen)
#if length is not enough to draw brance, Draw leaves there
else:
t.fillcolor('green')
#start fill
t.begin_fill()
t.circle(14)
#end fill
t.end_fill()
def main():
t = turtle.Turtle()
t.speed(0)
t.pensize(3)
myWin = turtle.Screen()
t.left(90)
t.up()
t.backward(100)
t.down()
t.color("brown")
drawGrapes(75,t)
myWin.exitonclick()

main()

Add a comment
Know the answer?
Add Answer to:
Using Turtle Graphics, add a graphical design of any Food item of your choice This is...
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