Question

Try out this code on IDLE, describe / explain what it does: import turtle t =...

Try out this code on IDLE, describe / explain what it does:

import turtle
t = turtle.Turtle()

for a in range(6):

t.circle(100)

t.right(60)

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

It opens a window a draws 6 circles on the window

Draws the circle with radius 100

moves right 60 and draws same circle with radius 100

it loops for 6 times

Add a comment
Know the answer?
Add Answer to:
Try out this code on IDLE, describe / explain what it does: import turtle t =...
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
  • Answer must be in Python 3 Answer: import turtle def trifecta(size,angle,num): for i in range(num): tri(t,size)...

    Answer must be in Python 3 Answer: import turtle def trifecta(size,angle,num): for i in range(num): tri(t,size) t.right(angle) t = turtle.Turtle() s = turtle.Screen() trifecta(100,25,5) Question 11 Part b (10 points) Write a function named trifecta() that takes three parameters: 1. size 2. angle 3. num trifecta() should call tri() repeatedly so as to draw num triangles, each with sides of length size. Each triangle should be oriented angle degrees clockwise from the preceding triangle. trifecta() should create a turtle and...

  • I need help with this code, I have it started here import sys import turtle menu...

    I need help with this code, I have it started here import sys import turtle menu = "Press 1 for Flower" UserChoice = input(menu) #function to draw squares def draw_square(square): for i in range(0,2): square.forward(100) square.right(70) square.forward(100) square.right(110) #function to draw flower def draw_flower(petalNumber): window = turtle.Screen() window.bgcolor("yellow") pen = turtle.Turtle() pen.shape("triangle") pen.color("red")    for number in range(0,petalNumber): draw_square(pen) pen.right(360/petalNumber) for i in range(0,4): pen.circle(20) pen.right(90)    pen.right(90) pen.forward(300) pen.right(90) draw_square(pen) pen.left(180) draw_square(pen) pen.left(270) pen.forward(200) window.exitonclick() #function for original art...

  • Using python Here is the code import turtle def draw_triangle(vertex, length, k): ''' Draw a ...

    Using python Here is the code import turtle def draw_triangle(vertex, length, k): ''' Draw a triangle at depth k given the bottom vertex.    vertex: a tuple (x,y) that gives the coordinates of the bottom vertex. When k=0, vertex is the left bottom vertex for the outside triangle. length: the length of the original outside triangle (the biggest one). k: the depth of the input triangle. As k increases by 1, the triangles shrink to a smaller size. When k=0, the...

  • The following is the code for using Tuturle in Python to write J A T I...

    The following is the code for using Tuturle in Python to write J A T I I have written A T I Please help me write J before A. Everything else is written. Thank you. import turtle from turtle import* #A pd() rt(120) fd(110) lt(180) fd(110) rt(120) fd(110) lt(180) fd(55) lt(60) fd(70) lt(180) pu() fd(130) fd(50) pd() # T lt(90) back(50) fd(100) lt(90) fd(50) lt(180) fd(100) pu() fd(50) #I pendown() left(90) back(100) right(100) penup() forward(50)

  • Here is a Python program. import turtle class Box:     def __init__(self, x, y, width, height):...

    Here is a Python program. import turtle class Box:     def __init__(self, x, y, width, height):         self.x = x         self.y = y         self.width = width         self.height = height     def show(self):         turtle.up()         turtle.goto(x, y)         turtle.down()         for _ in range(2):             turtle.forward(width)             turtle.right(90)             turtle.forward(height)             turtle.right(90) bigbox = Box(-100, -150, 200, 300) bigbox.show() turtle.done() If you run the above program, it will produce an error. What is the keyword that has...

  • Complete the code The instructions to a turtle can be encoded in a string. Complete Asn4_5 as fo...

    complete the code The instructions to a turtle can be encoded in a string. Complete Asn4_5 as follows: In main() the user will be prompted to enter instructions to a turtle as follows. The instructions will be entered in a loop that will end when the user enters quit or Quit at the first prompt. The first prompt will ask for a color. If the user enters quit or the user enters Quit the program will exit. The second prompt...

  • Hi. I require your wonderful help with figuring out this challenging code. import java.awt.Color; import java.awt.image.BufferedImage;...

    Hi. I require your wonderful help with figuring out this challenging code. import java.awt.Color; import java.awt.image.BufferedImage; import java.io.*; import javax.imageio.ImageIO; public class ImageLab { /* * This is the grayscale example. Use it for inspiration / help, but you dont * need to change it. * * Creates and returns a new BufferedImage of the same size as the input * image. The new image is the grayscale version of the input (red, green, and * blue components averaged together)....

  • Please try to explain briefly about the result of this given NMR and describe what the...

    Please try to explain briefly about the result of this given NMR and describe what the (specific ester) structure could be for this NMR. Also please try to give accurate results and explain all the possibilities. Thank you! ЗН 2ң

  • MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms w...

    MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. All of these involve some concept covered in this module. Code 1 Magnitude = 5; Angle = 210; X = Magnitude * cosd( Angle ) Y = Magnitude * sind( Angle ) Code 2 Xcomponents...

  • Provide comments for this code explaining what each line of code does import java.util.*; public class...

    Provide comments for this code explaining what each line of code does import java.util.*; public class Chpt8_Project {    public static void main(String[] args)       {        Scanner sc=new Scanner(System.in);        int [][]courses=new int [10][2];        for(int i=0;i<10;i++)        {            while(true)            {                System.out.print("Enter classes and graduation year for student "+(i+1)+":");                courses[i][0]=sc.nextInt();                courses[i][1]=sc.nextInt();                if(courses[i][0]>=1...

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