Programming Concepts

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

PROGRAMMIN

G CONCEPTS
• Program Definition

• Steps in Program Development

• Algorith

• Flowchart

• Basics Symbols in Flowchart

Topics • Guidelines for preparing a flowchart

• Flowchart Sample

• Flowchart Problems

• Variables and Operators

• Registers

• Sample Problems using registers

• Work examples and eercises


Programming
Definition
The program is prepared by planning a task and expressing it
accordingly by using computer language. It is also software that
helps to create, edit, and save a document or a file on your
computer. there are many other programming languages, which
can be used to write computer programs and this is one of the
examples: Java, C, C++, Python, PHP, Perl, juby and etc.
6 STEPS OF PROGRAM
DEVELOPMENT
DEFINING & ANALYZING THE
PROBLEM
The user needs to know the problem and find a possible
solution on how to solve the problem.

DESIGNING THE ALGORITHM


This helps provide the most effective solution for a problem. we
must also adopt or learn different strategies to provide workable
solutions for all kinds of problems.

CODING OR WRITING THE PROGRAM


Coding is a technique to tell the computer how to behave in
general. The correct and exact actions that need to be taken and
how to do them effectively and efficiently.

TEST EXECUTION
It is the process of implementing testing on any software that
is carried out by an independent team. This is good for large
program projects.
6 STEPS OF PROGRAM
DEVELOPMENT
DEBUGGING
The process of identifying errors or bugs in a program and also
fixing the identified bugs.

FINAL DOCUMENTATION
The result of the program When the program is finished, it helps
the user how to use the program most efficiently and easily.
ALGORITHM
An algorithm is a sequence of steps that must be carried out before a programmer starts
preparing his program. The programmer designs an algorithm to help visualize possible
alternatives in a program also. Algorithms work by breaking down complex problems into
smaller, more manageable steps and providing a systematic approach to solving them. By
following a structured design process and implementing the algorithm correctly, it's possible to
create efficient and reliable solutions to a wide range of problems in programming and beyond.

Algorithms work by breaking down complex problems into manageable


steps, providing a systematic approach to solving them. A programmer
can use these algorithms to create efficient and reliable solutions to a wide
range of problems.

I’ll give u some real life examples for u to understand algorithm.


Example of an algorithm
1. Gather Ingredients:
in making a peanut butter Retrieve two slices of bread, peanut butter, and a
sandwich knife or spoon.
2. Prepare Bread:
Place the two slices of bread on a clean surface.
3. Spread Peanut Butter:
Using the knife or spoon, scoop out a desired amount of
peanut butter and spread it evenly on one slice of bread.

4. Combine Slices:
Place the slice of bread with peanut butter on top,
creating a sandwich.
5. Cut and Serve (Optional):
If desired, cut the sandwich diagonally or into halves. Serve
the sandwich on a plate or wrap it for later consumption.
FLOWCHART

A flowchart is a useful representation for complex programs,


providing a visual representation of the program's functionality
and facilitating easy understanding and comprehension.
Basic symbols of Flowchart Back to Agenda Page

Terminator
Used to represent the start and in the end of the program with the keyboards BEGIN and END.
Process
An instruction that is carried by the program
Arrow
Indicates the algorithm pathways
Decision
Used to split the flowchart sequences into multiple path in order to represent selection and repetition.

Input/Output
Used to represent the data entry by a user or the display of data by the program.
Subprogram
References another program within the program
Manual Input Symbol
Represents a step where a user is prompted to enter information manually.
Guidlines for preparing a
Flowchart
• Step 1:
The Start block is always first.
• Step 2:
The program begins with number 1.
• Step 3:
The number 2 will be added to 1 so that the
program will continue to count by odd numbers.
• Step 4:
Add a decision block so that the program will
continue counting until the value is greater than 9.
• Step 5:
Once the number is greater than 9, the program
ends.
Flowchart Problem And Sample
Q1. Add 10 and 20 To solve this problem we will take a
variable sum and set it to zero. Then we will take the
two numbers 10 and 20 as input. Next we will add both
the numbers and save the result in the variable sum i.e.,
sum = 10 + 20. Finally, we will print the value stored in
the variable sum.

Algorithm (in simple English)


●Initialize sum = 0 (PROCESS)
●Enter the numbers (I/O)
●Add them and store the result in sum (PROCESS)
●Print sum (I/O)
Q2. Draw a flowchart to log in to facebook account. This problem can be solved in many
ways so, we will encourage you to think and draw a flowchart for this problem using your
imagination.

Algorithm (in simple English)


●Enter www.facebook.com in your browser.
(I/O)
●facebook Home page loads (PROCESS)
●Enter your Email ID and Password (I/O)
●Is Email ID and Password Valid (DECISION)
●if NO then
●Log in error (PROCESS)
●go to step 3
●Display facebook Account (I/O)
●Stop

You might also like