Skip to content

Commit 5cfb054

Browse files
committed
added 2 new kata questions for course 1 w/@dcoopersmith
added kata questions folder
1 parent dbfdef9 commit 5cfb054

2 files changed

Lines changed: 30 additions & 3 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package org.teachingkidsprogramming.recipes.completed.section01forloops.KataQuestions;
2+
3+
import org.teachingextensions.logo.Tortoise;
4+
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
5+
6+
//
7+
//------------Kata Question---------------//
8+
// How would you make a triangle with 20px thick sides?
9+
// Write out the steps in English
10+
// Then translate the steps into code
11+
// Make sure to run after each line
12+
//
13+
public class SimpleSquareKataQuestionThickTriangle
14+
{
15+
public static void main(String[] args) throws Exception
16+
{
17+
Tortoise.show();
18+
Tortoise.setSpeed(10);
19+
int sides = 3;
20+
for (int i = 0; i < sides; i++)
21+
{
22+
Tortoise.setPenColor(PenColors.Blues.Blue);
23+
Tortoise.move(50);
24+
Tortoise.turn(360 / sides);
25+
}
26+
}
27+
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section01forloops/SimpleSquareKataQuestion.java renamed to src/main/java/org/teachingkidsprogramming/recipes/completed/section01forloops/KataQuestions/SimpleSquareKataQuestionTriangle.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
package org.teachingkidsprogramming.recipes.completed.section01forloops;
1+
package org.teachingkidsprogramming.recipes.completed.section01forloops.KataQuestions;
22

33
import org.teachingextensions.logo.Tortoise;
44
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
55

66
//
77
//------------Kata Question---------------//
8-
// How would you make a triangle?
8+
// How would you make an equilateral triangle?
99
// Write out the steps in English
1010
// Then translate the steps into code
1111
// Make sure to run after each line
1212
//
13-
public class SimpleSquareKataQuestion
13+
public class SimpleSquareKataQuestionTriangle
1414
{
1515
public static void main(String[] args) throws Exception
1616
{

0 commit comments

Comments
 (0)