0% found this document useful (0 votes)
58 views

My Presentation in Computer Programming

This document discusses programming concepts like algorithms, pseudocode, and types of errors in programs. It provides examples of an algorithm to add two numbers and the corresponding pseudocode. It also gives an example problem of computing an employee's weekly salary based on hourly rate. The document teaches how to design algorithms and pseudocode to solve problems. It includes exercises for students to practice applying these concepts to problems like calculating the total and discount for 3 items.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

My Presentation in Computer Programming

This document discusses programming concepts like algorithms, pseudocode, and types of errors in programs. It provides examples of an algorithm to add two numbers and the corresponding pseudocode. It also gives an example problem of computing an employee's weekly salary based on hourly rate. The document teaches how to design algorithms and pseudocode to solve problems. It includes exercises for students to practice applying these concepts to problems like calculating the total and discount for 3 items.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

by: GENEVEVE T. REBACA/REY C.

GEROLAGA
Learning Objectives:

• Discuss Programming Circle, Algorithm and


Pseudocode.
• Design Algorithm and Pseudocode that will solve
real-life problems.
Scrutinize a sample Birthday Program
I. Opening remarks - Juan Dela Cruz
II. Intermission Nmuber- Show Girls
III. Invocation - Richard Yee
IV. Message - John Doe
V. Singing of Birthday Song – Mass Singing
VI. Message
VII. Dinner
A software bug is an error, flaw, mistake, failure, or fault
in a computer program that prevents it from behaving as
intended (ex. producing an incorrect or unexpected
result). Most bugs arise from mistakes and errors made
by people in either a program's source code or its
design.
- These are grammatical errors in the formulation of
statements.

Syntax errors include such things as misspelled


commands and missing "."
- These are errors that cannot be detected until the program is
running. The syntax of the statements is correct, but on execution
they cause a situation to arise that results in a crash or an
undefined value.
- Examples of run-time errors are attempted division by zero or trying
to access a non-existent object.
- These are errors that cause the program to behave incorrectly. They
generally arise through failure on the part of the programmer to
arrive at a correct algorithm for the task.
Typical problems might be incorrect ordering of statements, failure to
initialise or re-initialise a variable, assignment to an incorrect
variable, use of ‘<’ instead of ‘<=’, use of ‘and’ instead of ‘or’, or
omission of a crucial step in the processing.
Example Algorithm
Problem: Design an algorithm that will add 2 numbers.
Algorithm:
1. Input 2 numbers
2. Add 2 numbers
3. Display output
Apply Algorithm
Problem: Design an algorithm that will compute the weekly salary of an
employee which is paid on an hourly rate.
Pseudocode
• is an English-like representation of the logical steps it takes to solve a
problem.
• Problem: Design an algorithm that will add 2 numbers.
start
input: num1, num2
process: myAnswer = num1 + num2
output myAnswer
stop
Apply Pseudocode
• Problem: Design an algorithm that will compute the weekly salary of
an employee which is paid on an hourly rate.
Exercises
• Instruction: Use Algorithm and Pseudocode in designing solution to a
given problem.

• Problem: Design a solution that will get the total price of 3 items,
compute the discount of items which is 5% (all items), compute the
change considering payment is provided.
Assignment
• Study on the parts of IDE of a Visual Studio.net

You might also like