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 2 variables S and T that are equal to the sides of a rectangle. Calculate another variable that is equal to the perimeter of the rectangle.
Use: variables[2]
|
|
|
Test Using: S = 90, T = 26 |
Write a loop that prints "dum" 88 times
Use: loops[2]
|
|
|
|
Use a loop to print the sum of the numbers from 0 to 8
Use: variables, loops[2]
|
|
|
|
Print each number from 8 to 21
Use: loops[2]
|
|
|
|
Assume you have 2 lists of numbers with 18 elements each: F and Z. Add the 10th elements of the lists together.
Use: variables[1]
|
|
|
Test Using: F = [1,2,3,...,18], Z = [1,2,3,...,18] |
Use a loop to add the numbers from 0 to 47
Use: variables, loops[2]
|
|
|
|
Set two variables to different strings then make a new variable that combines them with a "B" in between
Use: variables[1]
|
|
|
|
Print each number from 1 to 14
Use: loops[2]
|
|
|
|
Print a variable that contains your first name
Use: variables[1]
|
|
|
|
|