Code Writer
Level 3, 2026-01-16
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 create a string that has 20 "E" characters
Use: variables, loops[2]
|
|
|
|
Create a list containing 3 fruit
Use: variables[1]
|
|
|
|
A triangle has sides of 2, 4 and 2. Create variables for the sides of the triangle and then calculate its perimeter.
Use: variables[2]
|
|
|
|
Use a loop to multiply the numbers from 8 to 21
Use: variables, loops[2]
|
|
|
|
Assume you have a list variable LIST. Count the number of items in LIST.
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 Q. Print the first element in the list.
Use: variables[1]
|
|
|
Test Using: Q = [1] Q = ['b','a','c'] Q = [85,93,95] |
Print each number from 1 to 29
Use: loops[2]
|
|
|
|
Set two variables to different values then add them together
Use: variables[1]
|
|
|
|
Use a loop to print a list of numbers, including a line number on each line
Use: variables, loops, str()[2]
|
|
|
|
|