Introduction_to_Programming.pptx
- 2. you will able to:
• Define what computer programming is
• Explain the terms related to computer programming such as
source code, programs, etc.
• Types of Computer Languages
• Types of translator program
- 3. What is Computer Programming?
• Computer programming is the process that programmers use to write
code that instructs how a computer, application or software program
performs.
Examples:
Automation
Applications / software (computer & mobile)
Operating systems
Games
- 4. What are the Importance of
programming in modern technology
and software development?
- 5. What is Programming Language?
• it is a formal language that will be used to direct instructions to the
computers.
• each programming language has its own syntax.
Examples:
1. C
2. C++
3. C#
4. Java
5. Python
- 6. Syntax
• the term “Syntax” means an
approved set of pre-defined
protocols or rules that we
need to follow while working
in a programming language.
# include<iostream>
using namespace std;
int main()
{
//Print Hello world on console and exit
cout<<"Hello world!"<<endl;
return 0;
}
- 7. Syntax Error
• occurs when the code violates
the rules of the programming
language's syntax. In other
words, the code is written in a
way that the language's
compiler or interpreter can't
understand.
Bug
• refers to any unexpected or
unintended behavior in a
program. It could be a logic
error, where the code doesn't
behave as intended due to
incorrect algorithm or
conditional statements.
- 9. Computer language
• Computer language is a code or syntax for writing programs or
specific applications. A computer language helps the user to tell the
computer what to do and how to do it.
- 12. 1. Low-Level Languages
• A low-level programming language is close in relation to a
computer’s instruction set and directly interacts with its
hardware components to convert the orders into action.
Types of Low-Level Language
a) Machine Language
b) Assembly Language
- 13. a) What is a Machine Language
• referred to as machine
code or object code.
• Machine language is defined as a
collection of bits to be read and
interpreted by a computer. It is
the only language understood by
a computer.
- 14. Example of machine language for the text “Hello
World” using Binary Code:
01001000 0110101 01101100 01101100 01101111 00100000
01010111 01101111 01110010 01101100 01100100
- 15. b) What is a Assembly Language
• Assembly language is defined as
any low-level programming
language with a high level of
correspondence between the
language instructions and the
machine code instructions of the
architecture.
• it is intended to communicate
with a computer hardware.
- 16. 2. What is a High-level Language
• any programming language that
enables development of a
program in a much more user-
friendly programming context
and is generally independent of
the computer's hardware
architecture
- 17. Types of High-Level Language
• a) Procedural Language - A procedural language is a third-generation
language easily created with simple procedures.
• examples of popular procedural languages: C Language, Fortran, Pascal,
BASIC, COBOL
• b) Functional Language - Functional language is a type of high-level language
that revolves around mathematical functions as their fundamental concept.
Functional languages give functions equal status by assigning them to
variables, using them as arguments in other functions, and returning them as
values from functions.
• examples of popular Functional Language: Haskell, Lisp, Erlang, F#
- 18. Types of High-Level Language
• c)Object Oriented Programming - Object-oriented programming languages
have become the predominant approach in developing new software. The
development process in these languages revolves around creating and
interacting with objects, which consist of pieces of code (modules) and data
structures.
• examples of popular Object-Oriented Programming Language: Java, Python,
C++, Ruby
• Scripting Language - Scripting languages are high-level languages to be user-
friendly and easy to learn for automating repetitive tasks and creating
dynamic web pages. Developers prefer interpreted scripting languages
because they do not require compilation before execution, enabling quick
prototyping and testing.4
• examples of popular Object-Oriented Programming Language: JavaScript,
Python, Perl, Bash, PHP
- 19. 3. Specialized Languages
• Specialized languages are programming languages that are for
specific uses or industries. They have special features and rules that
make them really good at solving certain kinds of problems. For
example, there are languages for designing web pages, languages
for working with databases, and even languages for doing scientific
calculations.
Types of Specialized Language
a) Markup Language
b) Query Language
- 20. Main 3 types of translator
programs – Compiler,
Interpreter & Assembler
- 21. What is Translator programs?
• are software which translate high level language into
machine language.
Human Understandable
Language
(High-Level Language)
Translator
Program
Machine
Understandable
Language
(Low-Level Language)
- 22. Types of translator programs
There are mainly 3 types of translator programs
we use today. These are as follows:
•Compiler
•Interpreter
•Assembler
- 23. 1. Compiler
• The language processor that reads the complete
source program written in high-level language as
a whole in one go and translates it into an
equivalent program in machine language.
• Some IDE (Integrated Development
Environment) gives the facility to build in
compilers.
- 24. IDE (Integrated Development Environment)
• An integrated development
environment is a software
application that provides
comprehensive facilities for
software development.
• An IDE normally consists of at
least a source-code editor, build
automation tools, and a
debugger
- 25. What does Compile mean?
• It is the process of creating an executable program from code written
in a compiled programming language.
- 26. 2. Interpreter
• also a popular translator program in the world.
The main function of interpreter is to convert a
high-level language to the machine language.
- 28. 3. Assembler
• Assembler is another translator
program which is used to
translate the code of assembly
language.
• Assembler can convert a
mnemonic code (code of
assembly languages) to the
machine code.
- 31. you will able to...
• Write algorithmic solutions to problems
• Apply the different program logic design tools in solving computing
problems
• Design, read, understand and construct program flowchart
• Express algorithms using pseudocode, flowcharts, and programming
language
- 32. What is Algorithm?
• A programming algorithm is a step-by-step procedure or a set of
instructions designed to solve a specific problem or perform a specific
task which should contain an Input, Process and an Output.
Programming Problem:
Create a program that will display the sum of two numbers
Algorithm:
1. Declare 3 Variables. 2 for the addens and 1 for the result
2. let the user input the two number
3. perform the addition between the two numbers and assign it to the sum
4. display the result or the sum
- 33. IPO Model
INPUT PROCESS OUTPUT
Two numbers
(num1, num2)
from the user.
Add num1 and
num2 to get the
sum
Display the sum
(result) to the
user.
- 34. What is Pseudocode?
• it is a method used to plan and describe algorithms using a
combination of natural language and simple programming-like
constructs.
• Pseudocode serves as an intermediate step between problem-solving
and actual coding, helping developers and programmers design
solutions before implementing them in a specific programming
language.
- 35. Programming Problem:
Create a program that will display the sum of two numbers
Psuedocode:
1. Start
2. Input num1 and num2
3. sum = num1 + num2
4. output sum
5. End
- 36. Programming Problem:
Create a program that will display the average of two numbers
Psuedocode:
1. Start
2. Input num1 and num2
= num1 + num2
4. average = sum /2
5. output average
6. End
- 37. Programming Problem:
Create a program that will display “Odd” or “Even” depending on
the number inputted by the user.
Psuedocode:
1. Start
2. Input num
3. if num is an even number, then
output “Even”
4. if num is an odd number, then
output “Odd”
5. End
- 38. Programming Problem:
Create a program that will display “Odd” or “Even” depending on
the number inputted by the user.
Psuedocode:
1. Start
2. Input num
3. if num % 2 == 0 then
Display "Even”
4. else Display "Odd"
5. End
- 39. What is Flowchart?
• is a visual representation of a process or algorithm using various
shapes and symbols to depict the sequence of steps and decisions
involved.
• Itrepresents the sequence of a programming algorithm by using
standard graphic symbols that will represent the input, process and
the output.
- 41. Programming Problem:
Create a program that will display the sum of two numbers
Programming Problem:
Create a program that will display the average of two
numbers
Programming Problem:
Create a program that will display “Odd” or “Even” depending
on the number inputted by the user.
- 42. Start
output sum
sum = num1 + num2
Input num1 and
num2
End
Programming Problem:
Create a program that
will display the sum of
two numbers
- 43. Start
output average
sum = num1 + num2
Input num1 and
num2
End
Programming Problem:
Create a program that
will display the average
of two numbers.
average = sum/2
Editor's Notes
- 1. Automation: perform tasks and operations with minimal human intervention.
Home Automation System: Programming a system that controls smart devices like lights, thermostats, and security cameras based on time, triggers, or user inputs.
Robotic Process Automation (RPA): Developing software bots to automate repetitive tasks in business processes, such as data entry or form processing.
Automated Manufacturing Systems: Writing code to control robotic arms and machinery in manufacturing processes, optimizing efficiency and precision.
2. Applications / Software (Computer & Mobile):
Microsoft Word:
Google Maps:
WhatsApp:
3. Operating Systems:
Linux: Contributing to the development of the Linux kernel, the foundation of the Linux operating system used on various devices.
macOS: Developing the core components and user interface elements of the macOS operating system for Apple computers.
4. Games:
Minecraft: Programming the gameplay mechanics, environments, and interactions within the popular sandbox game.
The Witcher 3: Wild Hunt: Developing a complex role-playing game (RPG) with an intricate storyline, quests, and dynamic open-world exploration.
Fortnite: Creating a multiplayer battle royale game with building mechanics, competitive gameplay, and in-game events.
- Innovation and Advancements: Programming drives technological innovation by enabling the creation of new software, applications, and systems. New technologies like artificial intelligence, machine learning, virtual reality, and the Internet of Things (IoT) are all powered by programming.
Software Applications: Virtually all software applications we use, from web browsers and social media apps to productivity tools and entertainment platforms, are developed through programming.
Entertainment and Media: Movies, animations, video games, and special effects heavily rely on programming for graphics, animation, sound, and interactive experiences.
Healthcare and Medicine: Programming contributes to medical research, diagnostics, electronic health records, medical imaging, and the development of medical devices and equipment.
Education and Learning: Programming is increasingly taught in schools to equip students with problem-solving skills, logical thinking, and computational literacy.
- the term “Syntax” means an approved set of pre-defined protocols or rules that we need to follow while working in a programming language.
- // Basic header file for giving Input/output function
# include<iostream>
//Standard namespace
using namespace std;
/* Entry point of the code */
int main()
{
//Print Hello world on console and exit
cout<<"Hello world!"<<endl;
return 0;
}
- Computer language is the language use to communicate with the computer. It comprises low-level, high-level, and specialized languages, further categorized as per their functions and use.
- - it is also called as low level language meaning to say it is hard for us humans to understand since it is just a series of binary digits
when we say binary digits it is composed of 0 and 1 are called binary digits
- Each group of eight ones and zeros is called a “byte.” In this case, each byte represents a specific letter or character in the text.
- assembly language uses short mnemonic codes or symbols to write program
While machine language is a binary language computers understand, assembly language is translated before execution.
- user-friendly = easy to understand by humans
examples of high-level language are: C, C#, C++, java, python, php... and so on...
- Markup languages are computer languages to format text for display on the web or in documents - HTML & XML
Query languages are simply computer languages that retrieve and manipulate data from databases.
- computers cannot understand human understandable language, so this means we need a translator.
- - one of the popular translator programs in the world. The main function of compiler is to convert source code to the machine code.
- compiler is mostly used among programmers. There are many compilers for different language.
- An integrated development environment is a software application that provides comprehensive facilities for software development.
example of IDE - codeblocks, DevC++, Visual Studio, etc...
- Interpreter translates a program line by line where compiler translates a program at a time.
- In computer programming, algorithms serve as the building blocks for writing code to automate tasks and make decisions based on given inputs.
Programming Problem:
Create a program that will display the sum of two numbers
Algorithm:
1. Declare 3 Variables ( a letter or word that serves as temporary storage that represent any value) 2 for the addens and 1 for the result
2. let the user input the two number
3. perform the addition between the two numbers and assign it to the sum
4. display the result or the sum
for example, we created a program na ia-add ang dalawang integer/number so ano yung input don? yung dalawang number, ano ung process nya? ung pag add and ano ung output? syempre ung sum or answer don sa dalawang number na inadd mo.
- The IPO Model is a conceptual framework used in computer science and software engineering to represent the lifecycle of a program or system. IPO stands for Input-Processing-Output, and it helps to break down the functionality and flow of a program into three main components:
Here's a basic example of an IPO model for a simple addition program:
Algorithm:
1. Declare 3 Variables ( a letter or word that serves as temporary storage that represent any value) 2 for the addens and 1 for the result
2. let the user input the two number
3. perform the addition between the two numbers and assign it to the sum
4. display the result or the sum
- it is a method that allows the programmers to represent the Algorithm in a more programming related way
while algorithm uses english sentence, in pseudocode uses programming terms to make it look like a code.
- when we use ‘Let’ we are declaring a variable
Variables ( a letter or word that serves as temporary storage that represent any value)
- when we use ‘Let’ we are declaring a variable
Variables ( a letter or word that serves as temporary storage that represent any value)