Code Writer
Level 3, 2026-05-17
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Do the sum 29 + 61 in code and store the result
Use: variables[1]
|
|
|
|
Assume you have a non-empty list of numbers Q. Write code to find the biggest number in the list.
Use: variables, loops, if[2]
|
|
|
Test Using: Q = [1,2,3] Q = [3,2,1,0] Q = [73,45,12] |
Assume you have a list variable LIST. Count the number of items in LIST and print the result.
Use: loops, variables[2]
|
|
|
Test Using: LIST = ['a','b','c'] LIST = [1,2,3,4,5,6] LIST = [] |
Assume you have a non-empty list of numbers Z. Write code to find the biggest number in the list.
Use: variables, loops, if[2]
|
|
|
Test Using: Z = [1,2,3] Z = [3,2,1,0] Z = [73,45,12] |
Use a loop to multiply the numbers from 1 to 17
Use: variables, loops[2]
|
|
|
|
Print each number from 0 to 35
Use: loops[2]
|
|
|
|
Assume you have a list of numbers Y. Write code to count the number of times the number 84 appears in the list.
Use: variables, loops, if[2]
|
|
|
Test Using: Y = [84] Y = [0,84,-1,84,99,84] Y = [77,43,49] |
Use a loop to print the sum of the numbers from 7 to 18
Use: variables, loops[2]
|
|
|
|
|