Skip to content

Commit 57cc810

Browse files
mjfremjfre
authored andcommitted
Improved Recipes
Changed all recipes so that they says to “USE A FOR LOOP to repeat that following code X times” Pentagon crazy: “Create a second variable to hold the angle” Tash me: -Specified where to put the background command -Changed step 3 to specify to put the code “on line 1 of your sketch’ -Changed step 8 to read “mustache.png” since most of the mustache files will be png Pentagon crazy: 10. Made it more clear that you need to change the line above Spiral: Changed step to “Turn 360/7 degrees” Scary maze: -Change default frame size to 800, 600 -Added Step 2: “and change the line above to match your file name” -Changed standardSound to a .wav -Changed lines of code the require files to use the standardScaryPicture and standardMaze by default -Changed step 3 to put the mouse at a starting position so that it is more clear that calling the method requires actual numbers as parameters -Changed title from June’s Scary Maze -Changed Step 8 to specify that the background color variable should be an int -Added step Step 6: run your program and find what color the background is -Separated step 8 into two steps. Step 8: now is to find a picture and step 9 is to load it using the code and change the code to match the filename of your image.
1 parent b72360a commit 57cc810

13 files changed

Lines changed: 41 additions & 33 deletions

src/section1/Tash Me/TashMe.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/section1/Tash Me/TashMe2017.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/section2/FlamingNinjaStar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static void main(String[] args) {
1717

1818
// 12. Set the robot speed to 10
1919

20-
// 13. Make all the code below repeat 25 times
20+
// 13. Use a for loop to repeat all of the code below 25 times
2121

2222
// 2. Turn the robot 1/8 of a circle
2323

src/section2/FourSquare.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void go() {
1212

1313
// 5. Set the pen width to 5
1414

15-
// 6. Do steps #7 to #8 four times...
15+
// 6. Use a for loop to repeat steps #7 to #8, four times...
1616

1717
// 7. Set the pen color to random
1818

src/section2/PentagonCrazy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ private void makePrettyThings() {
1919

2020
// 4. Make a variable for the number of sides you want (can’t test this one)
2121

22-
// 5. Make a variable for the angle you want the robot to turn. Hint: you can divide in Java using "/". Can’t test until step 6
22+
// 5. Make a second variable for the angle you want the robot to turn. Hint: you can divide in Java using "/". Can’t test until step 6
2323

24-
// 7. Do steps #2 to #11, 200 times. When this is done you should see a pentagon
24+
// 7. Use a for loop to repeat steps #2 to #11, 200 times. When this is done you should see a pentagon
2525

2626
// 2. Move the robot 200 pixels
2727

28-
// 10. Make the robot move "i" pixels instead of 200 (don’t need new line of code for this, just change previous one)
28+
// 10. Change the previous line of code to make the robot move "i" pixels instead of 200
2929

3030
// 6. Turn the robot the amount in your angle variable
3131

src/section2/SmartShapes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void main(String[] args) throws Exception {
1414
// 6. Make the robot move as fast as possible
1515

1616

17-
// 5. Do everything below here 4 times
17+
// 5. Use a for loop to repeat everything below 4 times.
1818

1919

2020
// 2. Move your robot 200 pixels

src/section2/Spiral.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ public class Spiral {
77
public static void main(String[] args) {
88
// 1. Create a new Robot
99

10-
// 5. Set your robot's pen to the down position
10+
// 5. Set your robot's pen down
1111

1212
// 3. Set the robot to go at max speed (10)
1313

14-
// 4. Do the following (steps 6-8) 75 times
14+
// 4. Use a for loop to repeat steps #7 to #8, 75 times
1515

1616
// 7. Change the pen color to random
1717

1818
// 6. Move the robot 5 times the current line number you are drawing (5*i)
1919

20-
// 2. Turn the robot 1/7 of 360 degrees to the right
20+
// 2. Turn the robot 360/7 degrees to the right
2121

2222
// 8. Set the pen width to i
2323

src/section2/StarShow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void makeStars() {
2222

2323
// 8. Make a variable to hold the star size and set it to 25
2424

25-
// 12. Repeat the steps #19 to #18, 30 times
25+
// 12. Use a for loop to repeat steps #19 to #18, 30 times
2626

2727
// 19. Set the pen width to i
2828

src/section2/TriangleShell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void go() {
1414

1515
// 4. make a variable to hold the length of the triangle and set it to 50
1616

17-
// 7. Do the following (up to step 10) 60 times
17+
// 7. Use a for loop to repeat steps #9 to #10, 60 times
1818

1919
// 9. Change the color of the pen to a random color
2020

src/section3/StephenHawking.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ public class StephenHawking {
88

99
// 1. make a main method and put steps 2, 3 & 4 inside it
1010

11+
// 4. Use a for loop to repeat steps #2 and #3, a lot of times
12+
1113
// 2. ask the user for a sentence
1214

1315
// 3. call the speak method below and send it the sentence
1416

15-
// 4. repeat steps 2 and 3 a lot of times
17+
1618

1719

1820

0 commit comments

Comments
 (0)