1/33
Looks like no tags are added yet.
Computer Program
list of instructions that directs the computer on its operations
Programming
the act of developing a computer program
Programmer
the person who develops computer programs
Steps in Program Planning and Development
Problem Analysis
Setting up the Algorithm
Coding
Encoding
Running, Testing, Debugging
Documentation
Problem Analysis
the initial phase where you define and understand the problem you’re trying to solve
involves analyzing the requirements, constraints, and objectives of the problem
Setting up the Algorithm
after understanding the problem, you need to design an algorithm
involves breaking down the problem into smaller, manageable tasks
Coding
translating your algorithm into actual python code
write the instructions that the computer will execute
involves using python syntax to implement the logic designed
Encoding
process of saving your python code into a file with appropriate extension (.py)
this step makes your code persistent, allowing you to reuse or share it
Running, Testing, Debugging
run the code to see if it works correctly
test different inputs to your program and verify if the output matches your expectations
debug code to identify and fix issues
Documentation
practice of creating explanatory materials that accompany your code
includes adding comments, writing comprehensive descriptions, and providing usage examples
Algorithm
finite set of instructions that specify a sequence of operations to be carried out in order to solve a problem
Properties of an Algorithm
Unambiguous
Input
Feasible
Finiteness
Output
Independent
Unambiguous
should be clear and must lead to only one meaning
Input
should have 0 or more well-defined inputs
Feasible
should be feasible with the available resources
Finiteness
must terminate after a finite number of steps
Output
should have 1 or more well-defined outputs and should match the described output
Independent
step-by-step instructions should be independent of any programming code
Flowchart
diagram representing the logical sequence in which a combination of steps or operations is to be performed
(graphical representation of an algorithm)
Terminal
CIRCLE - start/end
Input/Output
PARALLELOGRAM - input/output operations
Process/Operation
RECTANGLE - for processing and computations
Flow Lines
LINES - connect one flowchart symbol to another
Flow Direction Indicator
ARROW HEADS - show direction/flow
Preparation/Initialization
HEXAGON - initialization of values
Decision
DIAMOND - yes/no or true/false
On-Page Connector
CIRCLE - connect one flowcharting symbol to another on the same page; comes in pairs
Off-Page Connector
HOME PLATE SYMBOL - connect the flowcharting symbol to another on a different page; comes in pairs
Basic Control Structures
Sequence Structure
Selection Structure
Repetition Structure (Loop)
Combining Structures
Combining Structure
Sequence, Selection, and Repetition can be combined to solve complex problems.
Real programs use all three together—steps flow in order, branch on conditions, and loop until a goal is reached.