Programming Flashcards

1
Q

What is a program?

A

way of encoding algorithm in a precise enough way for computers to understand the instructions

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

What do high level programming languages do?

A

enable us to write program that are portable across different machines – they are closer to human languages

ie. Snap, Scratch, Python, C++, Java, Racket

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

What does a compiler/interpreter do?

A

takes a high level language and translates it into something that looks about the same, regardless of which high level language is used

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

What does an assembler do?

A

translates from Assembly language to Machine Code

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

What is an Assembly language?

A

specific to a particular computer architecture and operating system

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

What is machine code?

A

consists of binary or hexadecimal instructions that a computer can respond to directly

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

What is an algorithm?

A

precise, systematic method for producing a specified result

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

What are the 3 components of an algorithm?

A

sequencing
selection
iteration

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

What is sequencing?

A

instructions are executed in the specified order – order matters

  • programs will execute exactly in the order that’s given
  • if we assign values to variables, they’ll set one value after another, after another
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a mutation?

A

updating variables, changing oneself (a step)

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

What is selection?

A

allows algorithm to select which instructions to execute depending on conditions

‘if ____, then ____’
‘if ____, then ____, else ____’
‘if [possibility], then you can ____, otherwise, you must ____’

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

What is iteration?

A

allows algorithm to repeat instructions

  • loop: allows you to do the same thing over and over again, sometimes without a stopping condition, sometimes forever

‘repeat’
‘repeat until…’
‘repeat forever’

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

What are variables?

A

named storage location for data (named quantities – name + value)

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

Communication in Snap!

What is a broadcast?

A

sprites can send messages to each other

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

What is iterative design?

A

engaging in a continuous cycle (design → prototype → evaluate) until you have satisfied user specification

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

Be able to trace through code.

A

-

17
Q

Describe what a block of Snap! does in English.

A

-

18
Q

How do you describe a block of Snap! code in English?

A
  • describe code in terms of input and output, and what is being done

use phrases:

  • the block consumes…
  • it does…
  • it produces/displays/reports…
18
Q

What is a bug?

A

error or flaw in software that makes it produce wrong or unexpected results

19
Q

What is debugging?

A

process of finding and fixing bugs

  • some bugs can allow ‘black hat hacker’ to gain control of computer
20
Q

What are the 3 types of errors that can occur in software?

A

logical error
syntax error
semantic error

21
Q

What is logical error?

A

fail to initialize variable, or there’s an ‘off by one’ error – main type

22
Q

What is a syntax error?

A

incorrectly typed

23
Q

What is a semantic error?

A

flaw in your understanding of the question

24
Q

Why can flaw/failure in software programs occur?

A
  • program errors that programmers create while coding application (logical, syntax, and semantic errors)
  • lack of testing due to limited time, or not having skilled testers to thoroughly test application for issues and defects
  • frequent changes in requirements and miscommunications among clients, business analysts, developers, and testers
25
Q

Describe computer circuitry at the very lowest level.

A

made of wires, and each wire is either on or off

  • therefore, the only operations that can be performed at level are those that operate on single-bit values
26
Q

What are single-bit values?

A

just ones and zeros – ie. just ons and offs

27
Q

What are Boolean functions?

A
  • take Boolean values (true or false) as inputs, and report new Boolean value as output
  • Boolean operator consumes only one of two values (true or false), and can produce one of two values (true or false)
28
Q

Boolean Operators

What value (true or false) would be produced using the ‘and’ operator?

False and False
False and True
True and False
True and True

A

F
F
F
T

29
Q

Boolean Operators

What value (true or false) would be produced using the ‘or’ operator?

False or False
False or True
True or False
True or True

A

F
T
T
T

30
Q

Boolean Operators

When are ‘and’ operators true?

A

both blocks in the operator have to be true

31
Q

Boolean Operators

When are ‘or’ operators true?

A

at least one of the blocks in the operator have to be true