Back to Contents Page Lesson 3

Exercise Sheet: Building structures using iterations – Mark Scheme

Marking Criteria:

3 marks: Use of for loops and be able to build their name in the Minecraft game environment.

1 marks: No evidence of loops used, but able to build their name in the Minecraft game environment.

No marks: None of above completed

Task 1.1 - Building Basic Shapes & Structures

Marking guidance: The code written by students does not have to be exactly the same as the example answer given below. As long as the student can produce the same structure on the exercise sheet using iterations and less than 50 lines of code for each questions, marks can be awarded.

a) Code in Python – Example answer (2 marks)

1 for x in range(0, 29):

2       for y in range(0, 19):

3            for z in range(0, 24):

4                 mc.setBlock(x, y, z, 1)

5

b) Code in Python – Example answer (4 marks)

1   start = 0

2      end = 6

3      y = 0

4  for x in range(start, end):

5       mc.setBlock(x, y, 1, stone)

6  y += 1

7 start += 1

8  end -= 1

9

10 for x in range(start, end):

11      mc.setBlock(x, y, 1, stone)

12 y += 1

13 start += 1

14 end -= 1

15

16 for x in range(start, end):

17      mc.setBlock(x, y, 1, stone)

18 y += 1

19 start += 1

20 end -= 1

21

22 for x in range(start, end):

23      mc.setBlock(x, y, 1, stone)

24

Code in Python (recursion) – Example answer 2

1   start = 0

2   end = 6

3   y = 0

4

5   def triangle(start, end, y)

6       for x in range(start, end)

7            mc.setBlock(x, y, 1, stone)

8       y += 1

9       start += 1

10      end -= 1

11

12      if start >= end:

13           triangle(start, end, y)

14

15 triangle(start, end, y)

c) Code in Python – Example answer (5 marks)

1   def triangle(start, end, y)

2       for z in range(0, 8)

3            for x in range(start, end)

4                 mc.setBlock(x, y, z, stone)

5            y += 1

6            start += 1

7            end -= 1

8

9            if start >= end:

10                triangle(start, end, y)

11

12 for x in range(0, 8):

13      for y in range(0, 3):

14           for z in range(0, 6):

15                mc.setBlock(x, y, z, 1)

16

17 triangle(-1, 10, 4)

18

Task 2.0 – Building Basic Shapes and Structures

Marking criteria:

 Category Code (4 marks) Max 4 marks if the student included all the following in their code: ·      While loop ·      For loop ·      mc.player.getPos() ·      position.x ·      position.y ·      position.z ·      mc.setBlock(x, y, z, type) Max 3 marks if the student included 5 - 6 different functions and iterations from the list. Max 2 marks if the student included 2 - 4 different functions and iterations from the list. Max 1 mark if the student included 1 – 2 different functions and iterations from the list. No marks if no evidence of any function listed used. Creativity & Design (2 marks) Teachers can decide, judging on the creativity and the uniqueness of the design.