Code Writer
Level 3, 2026-05-12
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Assume you have a non-empty list of scores VAR for your math class. Calculate the range of the scores.
Use: variables, loops[3]
|
|
|
Test Using: VAR = [10] VAR = [1,2,3,4,5] VAR = [60,60,78] |
Assume you have a list of numbers X. Write code to count how many numbers in the list are smaller than or equal to than 20
Use: variables, loops, if[3]
|
|
|
Test Using: X = [] X = [20,0,25] X = [23,61,46] |
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]
|
|
|
|
Use a loop to create a string that has 30 "e" characters
Use: variables, loops[2]
|
|
|
|
Create a list containing 4 animals and then print each one
Use: variables, loops[2]
|
|
|
|
Print each number from 0 to 10
Use: loops[2]
|
|
|
|
|