Code Writer
Level 3, 2026-10-31
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 that are the same size: A and B. Count how many times an element in A is bigger than the element in the same position in B.

Use: variables, loops[2]

Test Using:
A = [5], B = [5]
A = [1,2,3], B = [3,2,1]
A = [81,66,7], B = [66,96,51]
A factorial of a number is all the numbers from 1 to that number multiplied together, so 4! = 1x2x3x4. Write code using a loop to calculate 87!

Use: variables, loops, str()[2]
Use a loop to add the numbers from 0 to 33

Use: variables, loops[2]
Set a variable to one value then change that value

Use: variables[1]
Assume you have a list variable LIST. Print each value in LIST.

Use: loops[2]

Test Using:
LIST = [1,2,3]
LIST = ['a','b',0]
LIST = []
Assume you have a variable S that is the length of the side of a square. Calculate another variable that is equal to the perimeter of the square.

Use: variables[2]

Test Using:
S = 48
Assume you have a list of numbers B. Print the 5th element of B.

Use: variables[1]

Test Using:
B = [1,2,3,4,5,6,7,8,9,10]
Assume you have a list of names, F. Write code to count the number of times the name "Felix" appears in the list.

Use: variables, loops, if[2]

Test Using:
F = []
F = ['Felix']
F = ['Felix','Edward','Edward','Felix']
Do the sum 54 * 71 and print the result

Use: [1]