Code Writer
Level 3, 2026-05-18
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Set a variable to one value then change that value

Use: variables[1]
Assume you have a list of numbers E. Write code to count the number of times the number 67 appears in the list.

Use: variables, loops, if[2]

Test Using:
E = [67]
E = [0,67,-1,67,99,67]
E = [2,68,55]
Set two variables to different values then add them together

Use: variables[1]
Assume you have a non-empty list of scores Z for your math class. Calculate the average of the scores.

Use: variables, loops[3]

Test Using:
Z = [10]
Z = [1,2,3,4,5]
Z = [98,99,88]
Do the sum 70 + 24 and print the result

Use: [1]
A rectangle has sides of 4 and 5. Create variables for the sides of the shape and then calculate its area

Use: variables[2]
Assume you have 2 lists of numbers with 11 elements each: VAR and Q. Add the 4th elements of the lists together.

Use: variables[1]

Test Using:
VAR = [1,2,3,...,11], Q = [1,2,3,...,11]
Assume you have 2 lists of numbers with 17 elements each: Z and F. Add the 9th elements of the lists together.

Use: variables[1]

Test Using:
Z = [1,2,3,...,17], F = [1,2,3,...,17]
A rectangle has sides of 2 and 6. Create variables for the sides of the shape and then calculate its area

Use: variables[2]
Print a variable that contains your first name

Use: variables[1]