Code Writer
Level 3, 2026-06-06
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 add the numbers from 0 to 39
Use: variables, loops[2]
|
|
|
|
Create a list containing 3 animals and then print each one
Use: variables, loops[2]
|
|
|
|
Use a loop to print the average of the numbers from 0 to 1
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 = [] |
Print a variable that contains your first name
Use: variables[1]
|
|
|
|
Assume you have a list of numbers Q. Create a new variable that is equal to sum of all the numbers in Q.
Use: variables, loops[2]
|
|
|
Test Using: Q = [] Q = [1,1] Q = [72,100,16] |
Set two variables to different strings then make a new variable that combines them with a "b" in 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 perimeter of the square.
Use: variables[2]
|
|
|
Test Using: S = 44 |
Set two variables to different strings then make a new variable that combines them with a "F" in between
Use: variables[1]
|
|
|
|
|