Algorithm Basics
Control Structures
Variables & Data
Procedures & Functions
Debugging & Logic
100

What is an algorithm?

A step-by-step procedure to solve a problem

100

What does an IF statement do?

Runs code if a condition is true

100

What is a variable?

A storage location for data

100

What is a prodecure?

Named set of instructions

100

What is debugging?

Finding and fixing errors

200

True or False: All algorithms must be efficient

False

200

What is a loop?

Repeats a set of instructions

200

What is a list?

A collection of multiple values

200
What are parameters?

Inputs that make procedures flexible

200

Identify error

print("Hello)

missing quote

300
Name one property of an algorithm

Finiteness/Input/Output/Effectiveness

300

Iteration vs Selection

Iteration=loops, Selection=decisions

300

Are computer-generated random numbers truly random?

No they are pseudo-random

300
What is a RETURN?

Sends back a value

300

What is a logic error?

Code runs but gives the wrong result

400

What is sequencing?

Executing steps in order

400

Predict output: 

x=5

if x> 3:

print ("Hi")

Hi

400
What is indexing?

Accessing position in a list (starts at 0)

400

What is input and output?

Input= data in, Output= result

400
What is a syntax error?

An error that breaks the rules of the programming language

500

What is the difference between an algorithm and program?

Algorithm= plan, Program= coded implementation

500

Why are loops important in simulations?

They allow many repeated trials for accuracy

500

x=2

x=x+3

x=5

500

Why do programmers use libraries?

To save time and reuse reliable code

500

Which type of error is usually the hardest to detect and why?

Logic error because the program runs but gives incorrect output

M
e
n
u