Code Writer
Level 3, 2026-07-16
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
A rectangle has sides of 3 and 6. Create variables for the sides of the shape and then calculate its perimeter

Use: variables[2]
Use a loop to print the average of the numbers from 0 to 6

Use: variables, loops[2]
A right angled triangle has 2 shorter sides of 6 and 6. Calculate the other side (the "hypotenuse").

Use: variables, sqrt()[2]
Use a loop to create a string that has 23 "f" characters

Use: variables, loops[2]
Use a loop to print the sum of the numbers from 0 to 9

Use: variables, loops[2]
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 = 42, T = 62
Assume you have a variable S that is the length of the side of a square. Calculate another variable that is equal to the area of the square.

Use: variables[2]

Test Using:
S = 51
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 = [21,67,100]