Quiz 1 Material Flashcards
sequence
- we start with the instruction written at the top
- we go in order, one instruction at a time
- each line is “one” thing to do
repetition
repeat something - LOOP
(- repeat a fixed number of times
- repeat until something happens)
conditions/decisions
maybe do something - IF
(- check something first)
Named Actions
- grouping many lower level actions in to one higher level name
- FUNCTION
- we think of a named action in 2 ways
- definition of the name action
- use of the named action
pseudocode
not quite in the computer’s language
(- it’s still specific, detailed, and followable
- no specific syntax)
algorithm
- a step by step list of instructions to solve a problem
(these steps must be followed EXACTLY)
good algorithm
- unambiguous
- executable
- terminating
- correct
statement
a single action to perform
execute
follow an instruction or sequence of instructions
program
the sequence of statements to be executed
keyword
a word that guides how to execute your program
variable
a name for a values, the value it is naming may change during execution - the name cannot be a keyword
expression
a portion of a statement describing a value
loops
statements that we might execute over and over again
every value has a _____
type
type casting
“reshape” a value of one type into a value of a different type