Introduction to ComputerProgramming
Objective
By the end of this lesson, students will be able to understand
the basic concepts of computer programming, write their
first simple program, and explain fundamental programming
terminology.
4.
What is ComputerProgramming?
Computer programming, also known as coding, is the process
of writing instructions that a computer can follow to perform
tasks. These instructions are written in programming
languages, which are specialized languages designed to
communicate with computers.
5.
Key Points:
ProgrammingLanguage: A set of rules and syntax
used to write code. Examples include Python, Java,
and JavaScript.
Code: The written instructions that a computer
executes.
Program: A set of related instructions that perform a
specific task or solve a problem.
6.
Basic Concepts ofProgramming
Algorithms
Definition: A step-by-step procedure for solving a
problem or performing a task.
Example: Making a sandwich involves a series of
steps such as getting ingredients, spreading butter,
etc.
7.
Basic Programming Terminology
Syntax: The rules that define the structure of valid code.
Debugging: The process of finding and fixing errors in code.
Compile: The process of converting code into machine
language (specific to compiled languages like C++). Python is
an interpreted language, so it executes code directly.
IDE (Integrated Development Environment): A software
application that provides tools for programming, such as
code editors and debuggers.
8.
What is ProgrammingLanguage?
A programming language (often abbreviated as
"prog lang") is a formal set of instructions that a
computer can understand and execute. It provides
a way for programmers to write software and
interact with the hardware of a computer or other
devices.
9.
Key Aspects ofProgramming Languages
Syntax
The set of rules that define the structure of valid code in the
language.
Similar to grammar in human languages, syntax dictates how code
must be written.
Semantics
The meaning behind the syntax.
Defines what the code does when executed, such as operations
and interactions.
Keywords and Operators
Keywords: Reserved words that have special meaning in the
language (e.g., if, for, while in many languages).
Operators: Symbols that perform operations on variables and
values (e.g., + for addition, == for equality).