Code Writer
Level 3, 2026-03-15
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Create a list containing 5 colors
Use: variables[1]
|
|
|
|
Use a loop to add the numbers from 0 to 12
Use: variables, loops[2]
|
|
|
|
Print your first name
Use: [1]
|
|
|
|
Do the sum 88 + 56 in code and store the result
Use: variables[1]
|
|
|
|
Print each number from 0 to 11
Use: loops[2]
|
|
|
|
Assume you have a list X with at least 2 elements. Create a new variable that is equal to the first two elements added together.
Use: variables[1]
|
|
|
Test Using: X = ['a','b','c'] X = ['big','dog'] X = [1,91,10] |
Assume you have a non-empty list of scores E for your math class. Calculate the maximum of the scores.
Use: variables, loops[3]
|
|
|
Test Using: E = [10] E = [1,2,3,4,5] E = [40,38,77] |
Assume you have a non-empty list Q. Create a new variable that is equal to the first element in the list.
Use: variables[1]
|
|
|
Test Using: Q = [1] Q = ['a','b','c'] Q = [23,95,57] |
Create two strings and join them together with a space between
Use: variables[1]
|
|
|
|
Assume you have a variable S that is the length of the side of a square. Calculate another variable that is equal to the area of the square.
Use: variables[2]
|
|
|
Test Using: S = 10 |
|