Code Writer
Level 3, 2026-02-06
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Do the sum 63 / 54 in code and store the result

Use: variables[1]
Print each number from 0 to 36

Use: loops[2]
Use a loop to print the average of the numbers from 0 to 4

Use: variables, loops[2]
Assume you have 2 lists of numbers that are the same size: VAR and Y. Count how many times an element in VAR is bigger than the element in the same position in Y.

Use: variables, loops[2]

Test Using:
VAR = [5], Y = [5]
VAR = [1,2,3], Y = [3,2,1]
VAR = [88,65,13], Y = [83,70,35]
Print each number from 1 to 16

Use: loops[2]
Use a loop to multiply the numbers from 7 to 21

Use: variables, loops[2]
A list contains a series of attacks on an enemy. The list looks like [1,2,3,1,1,2,...] where each element in the list is a number that means a type of attack:

1 is a light attack, taking 3HP
2 is a medium attack taking 4HP
3 is a strong attack taking 15HP

Write code to calculate the total amount of HP damage caused by all the attacks.

Use: variables, loops, if[3]

Test Using:
attacks = [1,2,3]
attacks = [1,2,3,3,2,1]
attacks = [11,42,47]
Create two strings and join them together with a space between

Use: variables[1]