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

Lesson 1 Understanding Computer Programming

Uploaded by

riana
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Lesson 1 Understanding Computer Programming

Uploaded by

riana
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

LESSON 1-UNDERSTANDING

COMPUTER PROGRAMMING

COMPUTER 10
I. DESCRIPTION
 In this lesson, you will understand about
programming with scratch application. Scratch is
a high-level block-based visual programming
language and website targeted primarily at
children 8-16 as an educational tool for coding.
Users of the site can create projects on the web
using a block-like interface. The service is
developed by the MIT Media Lab, has been
translated into 70+ languages, and is used in
most parts of the world.
II. OBJECTIVES:
At the end of this lesson, you should be able to:

 1) Define a program
 2) Explain the process of computer programming.

 3.) Understand the process of developing programs.

 4) Identify different types of programming control


structure.
 5) Understand ethics in computer programming

 6) Discover love for one’s nation


PROGRAMMING WITH SCRATCH 3
PROGRAMMING
 We have seen how computers and mobile devices changed the
way the world moves. They perform and automate tasks
instantly. The computer automatically scans the barcode,
calculates the total price of the groceries, accepts payments
and then computes the change. The smartphone, on the other
hand, displays the letters that were typed; send the message to
the recipient as soon as the send button is pressed.
 These devices, however, would not work without something
telling them what to do. They follow a program. A program is
a set of specific instructions that tells the computer what to do.
 If done correctly, the computer executes the program .The
process of creating a set of instructions or program is known
as programming. It is also referred to as coding.
PROGRAM DEVELOPMENT LIFE
CYCLE

Program Development Life Cycle


 Programmers follow a guide that helps
them create and develop any type of
program. This guide is called program
development life cycle (PDLC).It involves
five phases.
PROGRAM DEVELOPMENT LIFE
CYCLE

Problem Definition and Analysis


 In this phase, we determine the problem,
need and output of the problem.
Afterward, we identify the requirements
needed to solve the problem such as
variables data input from the user and
limitations of the program.
PROGRAM DEVELOPMENT LIFE
CYCLE
Algorithm Development
 After determining, the problem and its requirements we
then develop the program’s algorithm .An Algorithm
refers to the logical sequence of steps and procedures to
solve the problem. We break down solution step by step.
This is perhaps one of the most important phases in
program.
 The program’s algorithm is commonly represented in
two 2 ways using either a flowchart or pseudocode.
FLOWCHART AND
PSEUDOCODE
 Flowchart . It is a
diagram that represent the
algorithm. It contains
various shapes connected
by arrows .
 Pseudocode. It is a
detailed description of an
algorithm , displayed in an
easy understandable
language ( usually
English) , and not in a
complicated programming
language
CODING
 Coding
 After developing the program’s
algorithm , we have previously
defined a program. We have
previously defined a program as
a set of instruction. For the
computer to be able to
understand the instruction , we
use programming languages.
 In this phase, we use a
programming language to
communicate with the computer
.The programming languages
are also referred to codes. and
web based application.
TESTING AND
DEBUGGING
 Testing and Debugging
 Now that the code has been written out ,
we test if the code works and displays the
correct output. If it does , the code is
correct ; otherwise , we take a look at the
codes again and check for errors.
MAINTENANCE
Maintenance
This phase involves involve users
actively using the program .In this
phase , we can still check for
improvements, enhancements, or new
problems in the program ; thereby
repeating the same cycle again.
CONTROL STRUCTURE PROGRAMMING
 A control Structure programming shows how
instructions are performed. Programs are not always
done one step after another. Some programs may involve
decision making, depending on a given value. Other
programs would have to repeat instruction until a certain
conditions is met.
SEQUENTIAL STRUCTURE
 Sequential structure
 An instruction is performed sequentially : one after the
other this is simplest of structure.
CONDITIONAL STRUCTURES
PROGRAMMING
 Conditional structures programming
 Some instruction may involve decisions or
conditions before they are executed ; otherwise ,
another set of instructions is executed.
ITERATIVE (LOOPING
STRUCTURE)
 Iterative (looping structure)
 A certain set of instruction is repeated or looped or
certain number of times .
ETHICS IN PROGRAMMING

 Ethics in Programming
 Students and professionals in computer programming are
expected to follow ethical guidelines in developing
programs . By following these guidelines programmers
and to the community or society.
 The Association for Computer Machinery (ACM) an
educational and scientific computing society has its list
of ethical principles. It is called the ACM code of ethics
and Professional Conduct.
HERE ARE ITS GENERAL MORAL IMPERATIVES
 Contribute to society and to human well-being, acknowledging that
all people are stakeholders in computing.
 Programs should have little to no negative consequences , especially
on people’s health , safety, security, and privacy.
 Avoid harm to others
 Harmful actions include loss, damage, and /or modification of files
and information that lead to unnecessary waste of resources such as
time and effort.
 A programmer must take careful consideration when making
decisions during the design , implementation , use and removal of
software. He or she must follow the standards of system design
development, and testing.
 Be honest and trustworthy
 A programmer should always be honest about his or her system
design , including its problems and limitation. Fabrication and
GENERAL MORAL IMPERATIVES
 Be fair and take action not to discriminate unfairly.
 A programmer should not violate copyright law and give credit to where it is due. This
principle aims for the fair use of intellectual property , which is necessary for the
progress of technology for the people.
 Respect the work required to produce new ideas , inventions, creative works, and
computing artifacts.
 Respect privacy.
 If a program contains sensitive and personal information, it is the programmer’s
responsibility to respect the person’s privacy. A programmer should also establish
procedures to allow the person to review his or her personal data and correct any
inaccuracies.
 Honor confidentiality
 A programmer should not share personal information of employers, clients and users.
This principle pushes for the disclosure of the nature and content of any information to
appropriate authorities.
ACTIVITY 1

 How do we practice ethics in programming?


 How can we show our love for nation through
computer programming?
ACTIVITY 2

 ACTIVITY 2
 Answer the following activities on the book

 -Activity 1 (Identify the Term) pg. 8

 -Activity 2 (Understand the algorithm) pg.8

 -Activity 3(Get Online) pg. 9

 Assignment:

 -Answer pg. 10 Underline the Answer.

 Let’s Test Ourselves

 Reference: Computer for Digital Learners10

You might also like