Code Writer
Level 3, 2026-05-31
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 2, 4 and 5. Create variables for the sides of the triangle and then calculate its perimeter.

Use: variables[2]
Print each number from 0 to 20

Use: loops[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 list of numbers Y. Write code to add up the numbers in the list that are bigger than or equal to than 7

Use: variables, loops, if[3]

Test Using:
Y = []
Y = [5,6,7,8,9,10,11,12,13,14,15]
Y = [73,52,80]
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 28!

Use: variables, loops, str()[2]
Print each number from 0 to 40

Use: loops[2]
Print your first name

Use: [1]
Create two strings and join them together with a space between

Use: variables[1]