Chapter Two: Input, Processing, and Output Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Programs must be designed before they are written

A
  1. ) design the program
  2. ) write the code
  3. ) correct syntax errors
  4. ) test the program
  5. ) correct logic errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Write the code

A

each language has its own syntax that must be followed
Syntax means rules that dictate things such as how keywords, operators, and punctuation characters can be used
A syntax error occurs if the programmer violates any of these rules

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

Correct syntax Errors

A

If the program contains a syntax error the interpreter will display an error message.
When first writing a program, you will have syntax errors, these are almost impossible to avoid.
Once syntax errors have been corrected, the program can be compiled and translated into machine language.

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

Test the Program

A

Once the code is in executable form, it is then tested for logic errors.
A logic error is a mistake that does not prevent the program from running but causes incorrect results.

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

Correct Logic Errors

A

Of the program produces incorrect results, the programmer needs to debug the code.
To debug, means that you find and correct logic errors.
Sometimes you will find that the original design must be changed. If so, then the program development cycle starts over.

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

Algorithm

A

set of well-defined logical steps that must be taken to perform a task.
Steps in an algorithm are sequentially ordered and must be followed in sequence.
The algorithm must then be translated into code: Psuedocode Flowchart

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

pseudocode

A

fake code
Informal language that has no syntax rule.
Not meant to be compiled or executed.
Used to retake model program.

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

flowcharts

A

diagram that graphically depicts the steps in a program
Ovals are terminal symbols
Parallelograms are input and output symbols
Rectangles are processing symbols
Symbols are connected by arrows that represented the flow of the program

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

function

A

piece of prewritten code that performs an operations

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

print function

A

displays output on the screen

Example: print(‘Hello World’)

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

argument

A

data given to a function

Example: data that is printed to screen

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

string

A

sequence of characters that is used as data

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

string lateral

A

string that appears in actual code of a program.

Must be enclosed in a single (‘) or double (“) quote marks

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

comments

A

notes of explanation within a program

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

end-line comment

A

appears at the end of a lone code

Typically explains the purpose of that line

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

variable

A

name that represents a value stored in the computer memory

17
Q

assignment statement

A

used to create a variable and make it reference data

18
Q

data types

A

categorize value in memory

19
Q

numeric literal

A

number written in a program

20
Q

nested function call

A

general format: function1(function2(argument))

21
Q

math operator

A

tool for performing calculation

22
Q

operands

A

values surrounding operator

Variables can be used as operands

23
Q

exponent operator (**)

A

raises a number to a power

24
Q

multi line continuation character()

A

allows to break a statement into multiple lines