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

Use: variables[1]
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 = 66
Assume you have a list of numbers E. Write code to count how many numbers in the list are smaller than 15

Use: variables, loops, if[3]

Test Using:
E = []
E = [15,0,25]
E = [15,14,41]
Use a loop to print the average of the numbers from 4 to 23

Use: variables, loops[2]
Assume you have a list of numbers VAR. Write code to count how many numbers in the list are bigger than 9

Use: variables, loops, if[3]

Test Using:
VAR = []
VAR = [9,0,25]
VAR = [15,14,41]
Assume you have a list of names, A. Write code to count the number of times the name "Octavian" appears in the list.

Use: variables, loops, if[2]

Test Using:
A = []
A = ['Octavian']
A = ['Octavian','Missy','Melissa','Octavian']
A triangle has sides of 8, 2 and 2. Create variables for the sides of the triangle and then calculate its perimeter.

Use: variables[2]