Code Writer
Level 3, 2026-02-20
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Print each number from 2 to 14
Use: loops[2]
|
|
|
|
Write a loop that prints "e" 61 times
Use: loops[2]
|
|
|
|
Set two variables to different values then add them together
Use: variables[1]
|
|
|
|
Assume you have a non-empty list of numbers Y. Write code to find the biggest number in the list.
Use: variables, loops, if[2]
|
|
|
Test Using: Y = [1,2,3] Y = [3,2,1,0] Y = [79,29,37] |
Use a loop to print the sum of the numbers from 7 to 27
Use: variables, loops[2]
|
|
|
|
Print a variable that contains your first name
Use: variables[1]
|
|
|
|
A factorial of a number is all the numbers from 1 to that number multiplied together, so 4! = 1x2x3x4. Write code using a loop to calculate 42!
Use: variables, loops, str()[2]
|
|
|
|
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 = [10,34,79] |
Do the sum 23 - 93 in code and store the result
Use: variables[1]
|
|
|
|
|