Code Writer
Level 3, 2026-05-13
Answers should be legal Python code, including indentation. Use the underscore _ to show a space.
Special functions: print(), range(), sqrt(), str()
Create a list containing 3 animals and then print each one
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 = [] |
Print each number from 8 to 13
Use: loops[2]
|
|
|
|
Do the sum 44 - 41 and print the result
Use: [1]
|
|
|
|
Use a loop to create a string that has 14 "a" characters
Use: variables, loops[2]
|
|
|
|
Write a loop that prints "dum" 87 times
Use: loops[2]
|
|
|
|
Assume you have a list of numbers F. Print the 6th element of F.
Use: variables[1]
|
|
|
Test Using: F = [1,2,3,4,5,6,7,8,9,10] |
Use a loop to print 18 lines with a line number and the word "dumb". For example, line 1 should be "1: dumb", line 2 would be "2: dumb", etc.
Use: variables, loops, str()[2]
|
|
|
|
Assume you have a list of numbers F. Print the 9th element of F.
Use: variables[1]
|
|
|
Test Using: F = [1,2,3,4,5,6,7,8,9,10] |
|