Chapter 2 Flashcards
Program development cycle:
-design the program
-write the code
-correct syntax errors
-test the program
-correct logic errors
Most important part of the program development cycle
design
What is algorithm?
Set of well-defined logical steps that must be taken to perform a task
What is pseudocode?
Fake code
What is Flowchart?
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 represent the flow of the program
What three-step process do computers typically perform?
-Receive input
Input: any data that the program receives while it is running
-Perform some process on the input
Ex: mathematical calculation
-Produce output
A piece of prewritten code that performs an operation
Function
What displays output on the screen?
The print function
Data given to the function
Argument
Ex. data that is printed to screen
A sequence of characters that is used as data
String
String that appears in actual code of a program
String literal
-Must be enclosed in a single (‘) or double (“) quote marks
Notes of explanation within a program
Comments
-Intended for a person reading the programs code
-Being with #
What appears at the end of a line code?
End-line comment
-typically explains the purpose of that line
Name that represents a value stored in the computer memory
-Used to access and manipulate data stored in memory
-References the value it represents
Variable
Used to create a variable and make it reference data
-General format is variable = expression
Ex: age = 29
Assignment operator: the equal sign (=)
Assignment statement