Code Writer
Level 3, 2026-11-27
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 multiply the numbers from 3 to 17
Use: variables, loops[2]
|
|
|
|
Assume you have 2 lists of numbers that are the same size: F and Y. Count how many times an element in F is bigger than the element in the same position in Y.
Use: variables, loops[2]
|
|
|
Test Using: F = [5], Y = [5] F = [1,2,3], Y = [3,2,1] F = [93,85,39], Y = [86,80,19] |
Set a variable to one value then change that value
Use: variables[1]
|
|
|
|
Assume you have a non-empty list of numbers F. Write code to find the biggest number in the list.
Use: variables, loops, if[2]
|
|
|
Test Using: F = [1,2,3] F = [3,2,1,0] F = [34,25,50] |
Do the sum 59 - 23 in code and store the result
Use: variables[1]
|
|
|
|
Use a loop to print the sum of the numbers from 0 to 7
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 a list of numbers E. Write code to count the number of times the number 89 appears in the list.
Use: variables, loops, if[2]
|
|
|
Test Using: E = [89] E = [0,89,-1,89,99,89] E = [67,55,96] |
Print a variable that contains your first name
Use: variables[1]
|
|
|
|
|