File tree Expand file tree Collapse file tree
src/main/java/org/teachingkidsprogramming/recipes/completed/section01forloops/KataQuestions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1- package org .teachingkidsprogramming .recipes .completed .section01forloops ;
1+ package org .teachingkidsprogramming .recipes .completed .section01forloops . KataQuestions ;
22
33import org .teachingextensions .logo .Tortoise ;
44import 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 {
You can’t perform that action at this time.
0 commit comments