By: Lisa Anne Floyd and Steven Floyd
There is more than one solution to each challenge so the code and outputs may vary. This is one of the reasons that coding is so interesting for students. To return to the student activity page, click here.
1) Alter the code to plot 5 diamonds in quadrant 1. Hint: Change the defined count in the repeat.
Possible solution for Challenge 1:
Video describing possible solution for Challenge 1:
2) Alter the code to plot 10 diamonds in quadrant 2. Hint: Change the defined count in the repeat AND the change xcoord by value to a negative integer.
Possible Solution for Challenge 2:
Video describing possible solution for Challenge 2:
3) Alter the code to plot 20 diamonds in quadrant 3. Note: You may have to reduce the amount ycoord changes by to ensure the diamonds fit on the stage.
Possible Solution for Challenge 3:
Video describing possible solution for Challenge 3:
4) Alter the code to plot 10 diamonds in quadrant 4.
Possible Solution for Challenge 4:
Video describing possible solution for Challenge 4:
5) Alter the code so that diamonds are plotted until the xcoord value reaches greater than 100. Hint: Add a greater than conditional operator into the defined count of the repeat.
Possible Solution for Challenge 5:
Video describing possible solution for Challenge 5:
6) Try altering the code so that the plotted diamonds make a steeper line in quadrant 1 and stop when xcoord is greater than 50. Hint: Consider how much the ycoord changes by each time through the repeat.
Possible Solution for Challenge 6:
Video describing possible solution for Challenge 6:
7) Try altering the code so that 30 diamonds go across two quadrants. Hint: Adjust the initial values of the xcoord and ycoord variables (set blocks) and switch back to a simple repeat block.
Possible Solution for Challenge 7:
Video describing possible solution for Challenge 7: