Code Writer
Level 3, 2026-04-11
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Assume you have a non-empty list X. Create a new variable that is equal to the first element in the list.

Use: variables[1]

Test Using:
X = [1]
X = ['a','b','c']
X = [67,93,19]
Print each number from 0 to 17

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

Use: variables[1]

Test Using:
A = [1]
A = ['a','b','c']
A = [67,93,19]
Write a loop that prints "error" 81 times

Use: loops[2]
Print your first name

Use: [1]
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 = []
Print each number from 0 to 25

Use: loops[2]
Create a list containing 4 fruit and then print each one

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

Use: variables, loops, str()[2]