Follow The Turtle Imagine That You Have A Turtle Object Called Tina You Want Tina To Move Around On A Screen And Leave 1 (67.06 KiB) Viewed 177 times
Follow the Turtle Imagine that you have a Turtle object called tina . You want tina to move around on a screen and leave a trail that draws a triangle like below. Turtle Graphics Review TRYIT Using a for loop, direct tina to follow the exact same path as above. Your code must include the following in order for you to receive credit for your work Requirements: tina must move exactly as shown in the graphic above. You must include a for loop. You must declare an iterating variable i and initialize it to zero (e.g. int i = @ ). Your loop header must include i++). In other words, i gets incremented by 1 after each iteration • Each edge or line of the triangle that tina creates must be exactly 100 pixels Each angle of the triangle must be exactly 60 degrees Hint: The angle turned by tina and the angle of the triangle are supplementary to each other. Supplementary angles add up to 180 degrees. Loops: Exercise 1 When your code is ready, click the button below to submit your work for grading. Reminder: Make sure you fulfill all of the requirements above before submitting your work. Check It (1 left)
Exercise1.java X 1. 2 3 4 public class Exercisel { public static void main(String args[]) { = いのかい、 Turtle tina = new Turtle(0, 100); tina. speed (300); 5 6 7 // add code below this line 000 을 9 10 11 12 13 //add code above this line } }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!