Code Writer
Level 3, 2026-05-20
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
A triangle has sides of 5, 5 and 6. Create variables for the sides of the triangle and then calculate its perimeter.

Use: variables[2]
Assume you have a list variable LIST. Count the number of items in LIST.

Use: loops, variables[2]

Test Using:
LIST = ['a','b','c']
LIST = [1,2,3,4,5,6]
LIST = []
Assume you have a non-empty list B. Print the first element in the list.

Use: variables[1]

Test Using:
B = [1]
B = ['b','a','c']
B = [76,90,73]
Assume you have a list of numbers VAR. Write code to add up the numbers in the list that are bigger than or equal to than 9

Use: variables, loops, if[3]

Test Using:
VAR = []
VAR = [5,6,7,8,9,10,11,12,13,14,15]
VAR = [15,29,60]
Do the sum 85 * 43 in code and store the result

Use: variables[1]
Create a list containing 4 fruit and then print each one

Use: variables, loops[2]
Create two strings and join them together with a space between

Use: variables[1]
Use a loop to print the average of the numbers from 0 to 7

Use: variables, loops[2]
Assume you have a list of numbers Z. Print the 10th element of Z.

Use: variables[1]

Test Using:
Z = [1,2,3,4,5,6,7,8,9,10]