Code Writer
Level 3, 2026-08-24
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 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 = 80 |
Use a loop to create a string that has 38 "E" characters
Use: variables, loops[2]
|
|
|
|
Use a loop to multiply the numbers from 1 to 41
Use: variables, loops[2]
|
|
|
|
Assume you have a non-empty list of numbers VAR. Create a new variable that is equal all the numbers in VAR multiplied together.
Use: variables, loops[2]
|
|
|
Test Using: VAR = [1,1] VAR = [1,2,3,4,5] VAR = [80,8,93] |
Create a list containing 4 numbers and then print each one
Use: variables, loops[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 = [] |
Assume you have 2 lists of numbers with 12 elements each: VAR and B. Add the 10th elements of the lists together.
Use: variables[1]
|
|
|
Test Using: VAR = [1,2,3,...,12], B = [1,2,3,...,12] |
Print each number from 1 to 44
Use: loops[2]
|
|
|
|
|