Code Writer
Level 3, 2026-02-20
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Use a loop to print the average of the numbers from 0 to 4

Use: variables, loops[2]
A right angled triangle has a hypotenuse (longest side, opposite the right angle) of 14 and another side of 5. Calculate the length of the missing side.

Use: variables, sqrt()[2]
Print a variable that contains your first name

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

Use: loops[2]
Assume you have a list of numbers A. Print the 6th element of A.

Use: variables[1]

Test Using:
A = [1,2,3,4,5,6,7,8,9,10]
A right angled triangle has a hypotenuse (longest side, opposite the right angle) of 15 and another side of 3. Calculate the length of the missing side.

Use: variables, sqrt()[2]
A right angled triangle has 2 shorter sides of 6 and 5. Calculate the other side (the "hypotenuse").

Use: variables, sqrt()[2]
Print each number from 4 to 6

Use: loops[2]
Assume you have two non-empty lists of numbers Q and Y. Create a new variable that is equal to the first element of each list added together.

Use: variables[1]

Test Using:
Q = [1], Y = [1]
Q = [1,2,3], Y = [3,2,1]
Q = [100,33,36], Y = [63,7,83]