Code Writer
Level 3, 2026-07-09
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 50
Use: variables, loops[2]
|
|
|
|
Assume you have a non-empty list of numbers X. Write code to find the biggest number in the list.
Use: variables, loops, if[2]
|
|
|
Test Using: X = [1,2,3] X = [3,2,1,0] X = [31,40,22] |
Use a loop to multiply the numbers from 3 to 17
Use: variables, loops[2]
|
|
|
|
Print each number from 2 to 15
Use: loops[2]
|
|
|
|
Use a loop to add the numbers from 0 to 23
Use: variables, loops[2]
|
|
|
|
Set a variable to one value then change that value
Use: variables[1]
|
|
|
|
Create two strings and join them together with a space between
Use: variables[1]
|
|
|
|
Use a loop to print a list of numbers, including a line number on each line
Use: variables, loops, str()[2]
|
|
|
|
Assume you have a non-empty list Y. Print the first element in the list.
Use: variables[1]
|
|
|
Test Using: Y = [1] Y = ['b','a','c'] Y = [6,35,80] |
|