Code Writer
Level 3, 2026-08-11
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Use a loop to print the sum of the numbers from 0 to 3

Use: variables, loops[2]
Print your first name

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

Use: variables, loops, str()[2]
A triangle has sides of 7, 3 and 9. Create variables for the sides of the triangle and then calculate its perimeter.

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

Use: variables, loops, str()[2]
Create a list containing 3 colors and then print each one

Use: variables, loops[2]
Print each number from 3 to 14

Use: loops[2]
Assume you have a non-empty list B. Create a new variable that is equal to the first element in the list.

Use: variables[1]

Test Using:
B = [1]
B = ['a','b','c']
B = [78,37,23]
Assume you have a non-empty list X. Print the first element in the list.

Use: variables[1]

Test Using:
X = [1]
X = ['b','a','c']
X = [22,38,91]