Code Writer
Level 3, 2026-10-12
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 list variable LIST of numbers. Use a variable to add the items in the list
Use: variables, loops[2]
|
|
|
Test Using: LIST = [1] LIST = [1,2,3,4,5,6,7,8,9] LIST = [59,14,79] |
Use a loop to print the sum of the numbers from 0 to 6
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 = [33,75,95] |
Use a loop to print the average of the numbers from 0 to 5
Use: variables, loops[2]
|
|
|
|
Print each number from 7 to 14
Use: loops[2]
|
|
|
|
Set two variables to different values then add them together
Use: variables[1]
|
|
|
|
Use a loop to multiply the numbers from 1 to 25
Use: variables, loops[2]
|
|
|
|
|