programming Flashcards

1
Q

what is an algorithm?

A

a set of instructions that describes how to solve a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what does language independent mean?

A

describes an algorithm that can be translated into any programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is psuedo-code?

A

a simple way of describing a set of instructions in a manner that resembles a programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is an input?

A

data which is inserted into a system for processing and/or storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is a process?

A

an action taken by the program without input from the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is an output?

A

data which is sent out of a system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is assignment?

A

setting the value of a variable in a computer program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

why are flowcharts used?

A

a diagram that shows an overview of an algorithm and help construct a step by step solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what do the different symbols in a flowchart mean?

A

rectangle = process
parallelogram = input/output
diamond = decision
oval = start/stop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is decomposition?

A

breaking down a problem into smaller, more manageable chunks so they can be solved on their own

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is abstraction?

A

the process of removing unnecessary detail from a problem so that the important details can be focused on = makes problem solving easier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is a variable?

A

a memory location within a computer program where values are stored

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what are trace tables?

A

tables that keep track of changing variables
used when testing a program to record changes in variable values as code executes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is data?

A

units of information
integers, characters, Boolean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

define effciency

A

how much time it takes to run a particular algorithm and how much space is needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is an array?

A

a set of data values of the same type, stored in a sequence in a computer program
aka list

17
Q

what is a search?

A

an algorithm that searches through a data set to find an item

18
Q

what is a sort?

A

an algorithm that puts items in a data set into order

19
Q

how does a linear search work?

A
  1. identify a search item
  2. look at the first item in the list
  3. compare the item with the search item
  4. check if they are the same, if so item is found, if not move to next item
  5. repeat these steps until last item in the list has been reached
20
Q

how does a binary search work?

A
  1. start by setting the counter to the middle position in the list
  2. if the value held there is a match, the search ends
  3. if the value at the midpoint is less than the value to be found, list is halved, and upper half of list is searched and vice versa
  4. search moves to the midpoint of the remaining items and the steps continue until item is found
21
Q

linear vs binary search

A
  • for binary the data must be ordered, for linear not
  • if list is longer and in order binary is more efficient (takes less time)