Code Writer
Level 3, 2026-02-24
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Print your first name

Use: [1]
Assume you have a list of numbers B. Create a new variable that is equal to sum of all the numbers in B.

Use: variables, loops[2]

Test Using:
B = []
B = [1,1]
B = [62,49,13]
A right angled triangle has 2 shorter sides of 9 and 2. Calculate the other side (the "hypotenuse").

Use: variables, sqrt()[2]
A right angled triangle has 2 shorter sides of 8 and 4. Calculate the other side (the "hypotenuse").

Use: variables, sqrt()[2]
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 = []
A triangle has sides of 7, 3 and 7. Create variables for the sides of the triangle and then calculate its perimeter.

Use: variables[2]
Use a loop to print 88 lines with the numbers from 1 to 88 and each number times 3, separated by a commma. For example, line 1 would be "1, 3", line 2 would be "2, 6",etc.

Use: variables, loops, str()[2]
A right angled triangle has 2 shorter sides of 2 and 8. Calculate the other side (the "hypotenuse").

Use: variables, sqrt()[2]