Code Writer
Level 3, 2026-09-04
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Assume you have 2 lists of numbers with 13 elements each: VAR and Z. Add the 5th elements of the lists together.

Use: variables[1]

Test Using:
VAR = [1,2,3,...,13], Z = [1,2,3,...,13]
Create a list containing 4 fruit and then print each one

Use: variables, loops[2]
Assume you have a non-empty list E. Print the first element in the list.

Use: variables[1]

Test Using:
E = [1]
E = ['b','a','c']
E = [91,37,28]
Use a loop to print 90 lines with the numbers from 1 to 90 and each number times 17, separated by a commma. For example, line 1 would be "1, 17", line 2 would be "2, 34",etc.

Use: variables, loops, str()[2]
Use a loop to print 50 lines with a line number and the word "fake". For example, line 1 should be "1: fake", line 2 would be "2: fake", etc.

Use: variables, loops, str()[2]
Assume you have a variable S that is the length of the side of a square. Calculate another variable that is equal to the area of the square.

Use: variables[2]

Test Using:
S = 70
A right angled triangle has 2 shorter sides of 3 and 9. Calculate the other side (the "hypotenuse").

Use: variables, sqrt()[2]
Use a loop to create a string that has 39 "e" characters

Use: variables, loops[2]
Assume you have 2 lists of numbers with 16 elements each: X and Q. Add the 10th elements of the lists together.

Use: variables[1]

Test Using:
X = [1,2,3,...,16], Q = [1,2,3,...,16]