General
Selection
Iteration
Functions
Lists
100

What is an algorithm?

An algorithm is a finite, unambiguous sequence of instructions for performing a specific task

100

Name the type of selection we have looked at

If-then blocks

100

Name the 2 types of iteration we have looked at

For and while loops

100

What is a function?

A separated block of code that performs a clearly defined task

100

What is a list?

A list is a finite sequence of elements, contained within square brackets [ ] 

200

What does p ← 5 mean?

Assign the value 5 to the variable p

200

What is the basic structure of a if-then block?

 

200

What is the basic structure of a while loop?


200

What is the basic structure of a function?


200

What does append do?

Adds an element to the end of a list

300

What are nested loops?

Loops within loops

300

What is the output?

odd 117

300

What is the basic structure of a for loop?

 

300

How many inputs and outputs can a function have?

One or more inputs

One output

300

A ← [3, -4, 18, 99]

What is A[3]?

18

400

What are the 3 mistakes in the following code?


i cannot go from 4 to 2

Assignment arrow is backwards

Should be end for not end if

400

What is wrong with the following?


missing then

400

What is the output?

 

23

400

What is quotient(47, 4)?


11

400

What is the output?


[4, 8, 11, 16]

500

What is wrong with the following code?

 

If x is positive, an infinite loop is created

500

What is the output?

 

hello duck

500

What is the output?


-1

500

What is the value of c when count becomes 2?

7/2

500

What is the output? 


x, y, z

M
e
n
u