0% found this document useful (0 votes)
6 views30 pages

Introduction To Programming

The document provides an introduction to programming, explaining its significance in modern life and how it enables interaction with technology through code. It discusses the concept of code, the importance of computer programming, and the principles of modularity in programming. Additionally, it outlines various programming languages, their classifications, and popular examples, highlighting their applications and features.

Uploaded by

tylertee319
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views30 pages

Introduction To Programming

The document provides an introduction to programming, explaining its significance in modern life and how it enables interaction with technology through code. It discusses the concept of code, the importance of computer programming, and the principles of modularity in programming. Additionally, it outlines various programming languages, their classifications, and popular examples, highlighting their applications and features.

Uploaded by

tylertee319
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

INTRODUCTION TO PROGRAMMING

• Lec STEPHEN BOSIRE NYABUTO


WHAT IS PROGRAMMING
• Every time you turn on your smartphone, laptop, tablet,
smart TV, or any other electronic device, you are running
code that was planned, developed, and written by
developers. This code creates the final and interactive result
that you can see on your screen.
• That is exactly what programming is all about. It is the
process of writing code to solve a particular problem or to
implement a particular task.
• Programming is what allows your computer to run the
programs you use every day and your smartphone to run the
apps that you love. It is an essential part of our world as we
know it.
• Whenever you check your calendar, attend virtual
conferences, browse the web, or edit a document, you are
using code that has been written by developers.
• WHAT IS A CODE
• Code is a sequence of instructions that a programmer writes
to tell a device (like a computer) what to do.
• The device cannot know by itself how to handle a particular
situation or how to perform a task. So developers are in
charge of analyzing the situation and writing explicit
instructions to implement what is needed.
• To do this, they follow a particular syntax (a set of rules for
writing the code).
• A developer (or programmer) is the person who analyzes a
problem and implements a solution in code.
WHY IS COMPUTER PROGRAMMING IMPORTANT?
• Computer programming is one of the most important aspects
of modern life. It allows us to interact with computers in ways
that were not possible before. It has enabled us to conduct
research, design new products, and services, manage our
finances, communicate with others around the World, and
much more.
• Computers and the internet have completely changed the
way we live our lives and interact with the world around us. It
allows us to connect with people on the other side of the
globe in an instant. Programming has changed the way we
shop, travel, learn, and work. They are an essential part of
our everyday lives. Without computers and the internet, our
lives would be very different.
• Computer Programming allows us to create new internet-
based applications and services that make it possible for us
to communicate and collaborate with one another like never
before.
• Programming is a fascinating and versatile field you can use
for so many different things. Here are just a few of the
benefits:
1. Computer programming can be used to create innovative
and functional software: Computer programmers can use
their creativity to design software that will be useful to
people, or that will improve the way that people work. For
example, a computer programmer might design a program
that analyzes data from medical tests to determine the
presence of a particular disease. The program could be
2. Computers can also be programmed to perform specific
tasks using mathematical algorithms and logic. Computer
programmers can create programs that use these algorithms
to carry out tasks such as sorting data or calculating the
results of complex equations.
3. It can also be used to create websites, games, and other
digital content. In this way, computer programs make it
possible for people to access a wide range of entertainment
and information online. In addition to creating new content,
computer programmers can also help improve existing
software and applications. They can add new features and
options to existing programs to improve the usability and
quality of these programs. For example, a programmer could
update an existing gaming app to make it easier to use on a
READING ASSIGNMENT

• How can computer programming or coding help the world?


WHAT IS A MODULE?
• A module is a self-contained piece of code that contains
functions, classes, or variables grouped together for a
specific purpose.Think of a module as a file (or block) of code
that does one job well — like handling login logic, processing
payments, or managing user data.
• What is Modularity?
• Modularity is a design principle in programming where a
program is broken down into separate, independent parts
(modules). Each module is responsible for one aspect of the
functionality.
• Goal: Make code easier to read, maintain, reuse, and test.
• Why Modularity is Important
1.Separation of Concerns: Each module handles one part of
the system (e.g., database, authentication, UI).
2.Reusability: You can reuse modules in other projects.
3.Maintainability: Easier to update or fix bugs in one module
without affecting others.
4.Scalability: Large projects can grow more easily with
modular structure.
5.Team Collaboration: Teams can work on different modules
independently.
Tips for Good Modularity
• Keep each module focused on a single purpose.
• Use meaningful names.
• Avoid tightly coupling modules — they should work independently.
• Document what each module does.

Real-Life Analogy
• Imagine building a car:
• The engine, wheels, brakes, and radio are all built separately (as
modules).
• Each part works independently but contributes to the whole car.
• You can upgrade the radio without touching the engine — that’s
modularity.
• Examples of Modules in Different Languages
• Python: Any .py file is a module;
• JavaScript: Use import/export in ES6 or require in Node.js
• Java: Uses packages with classes in different files
• C/C++: Uses .h header files and .c or .cpp implementation
files
PROGRAMMING LANGUAGE
• A programming language is a language that computers can
understand.
• We cannot just write English words in our program like this:
"Computer, solve this task!"
• and hope that our computer can understand what we mean.
We need to follow certain rules to write the instructions.
• Every programming language has its own set of rules that
determine if a line of code is valid or not. Because of this, the
code you write in one programming language will be slightly
different from others.
• Some programming languages are more complex than others
but most of them share core concepts and functionality. If
you learn how to code in one programming language, you will
• there are a lot of programming languages, more than 700 actually, to choose
from.
• Some of the key features of programming languages include:
1. Syntax: The specific rules and structure used to write code in a
programming language.
2. Data Types: The type of values that can be stored in a program, such as
numbers, strings, and booleans.
3. Variables: Named memory locations that can store values.
4. Operators: Symbols used to perform operations on values, such as addition,
subtraction, and comparison.
5. Control Structures: Statements used to control the flow of a program, such
as if-else statements, loops, and function calls.
6. Libraries and Frameworks: Collections of pre-written code that can be used
to perform common tasks and speed up development.
7. Paradigms: The programming style or philosophy used in the language,
such as procedural, object-oriented, or functional.
GENERATION OF PROGRAMMING
LANGUAGES
• A program can be written in a variety of programming
languages. The languages can broadly be
• classified into two categories:
Low-level language – which refers to the machine language
and assembly language.
High-Level languages: - which refers to languages such as
COBOL, FORTRAN, BASIC
• LOW LEVEL LANGUAGES
• Machine programming Language
• Machine code or object code, machine language is a collection of
binary digits or bits that the
computer reads and interprets. Machine language is the only language
a computer is capable of understanding.
• Advantages
• Program translation was fast because no conversion was required.
• The program could directly address and control the internal circuitry
meaning that these programs were more effective in hardware usage
and control.
• Disadvantages
• Writing programs was time consuming
• Tracing errors in a program was extremely difficult.
• Difficult to learn and use.
• Program modification was cumbersome.
• They were machine dependent i.e. a program created for one
type of machine would not work on a different type of
machine.
• To write an effective program the programmer had to have
expert knowledge on the computer’s internal workings.
Second generation /Assembly Language
• This language was more user oriented than machine language.
Instructions are represented using mnemonic code and symbolic
addresses. Words like add, sum etc could be used in programs.
An assembler translated these codes into machine language.
• Advantages
• Much easier to learn compared to machine language.
• Coding took less time than coding using machine language.
• Error correction was less cumbersome.
• Disadvantages
• Were also machine specific
• Execution took longer than machine language programs due to
the translation process.
• HIGH LEVEL LANGUAGES
• These languages are user friendly and problem oriented
compared to the low level languages.
• Programs written in high level languages are shorter than the
machine language programs.
• Program instructions are written using familiar English-like
statements and mathematical statements.
• A single high-level language program is translated into
multiple machine code instructions.
• Advantages
• They are portable i.e. they can be used on more than one type of machine.
• Creating program and error correction takes less time.
• Are relatively easy to learn and use.
• The programmer does not have to be an expert on the internal workings of
the machine.
• Disadvantages
• Program execution takes more time due to the translation process.
• They do not address the internal circuitry of computers as effectively as
the low level languages.
• A translated program will occupy more space.
High level languages can further be classified into:
• Procedural languages (Third Generation)
• Non-Procedural Languages (Fourth Generation Languages or 4GLs)
• Third generation/Procedural languages
• They require the programmer to specify step-by-step how the
computer will accomplish a specific task.
• Program execution follows the exact sequence laid down by the
programmer during coding. Examples
• include FORTRAN, C, BASIC,
• Fourth Generation Languages or 4GLs/Non-Procedural Languages
• They allow the programmer to specify the desired result without
having to specify the detailed procedure needed to achieve the result.
• They are more user oriented and allow programmers to develop
programs with fewer commands compared with 3rd generation
languages. They are called non procedural because programmers can
write programs that need only tell the computer what they want done,
not all the procedures of doing it.
READING ASSIGNMENT

• READ ON Fifth-generation programming


language
SOME OF THE WIDELY USED PROGRAMMING LANGUAGES

• 1. Python — Artificial Intelligence & Machine Learning


• Popular Frameworks: Django, Flask
• Platform: Web, Desktop
• Popularity: #1 on PYPL Popularity Index of March 2021, #3 on Tiobe
Index for March 2021, Loved by 66.7% of StackExchange
developers in 2020, and wanted by 30%, the most of any language.
• What this language is used for —
• Although Python can be used to build pretty much anything, it
really shines when it comes to working on technologies like
Artificial Intelligence, Machine Learning, Data Analytics. Python also
proves to be useful for web development, creating enterprise
applications, and GUIs for applications.
2. JavaScript — Rich Interactive Web Development
• Popular Frameworks: Node.js, Angular, React.js, Vue, Meteor
• Platform: Web, Desktop, Frontend scripting
• Popularity: #3 on PYPL Popularity Index of March 2021, #7 on
Tiobe Index for March 2021, Loved by 58.3% of
StackExchange developers in 2020, and wanted by 18.5%,
the most of any language.

• What this language is used for —


• JavaScript is the perfect option if you want your app to run
across a range of devices, such as smartphones, cloud,
containers, micro-controllers, and on hundreds of browsers.
For the server-side workloads, there’s Node.js, a proven
• 3. Java — Enterprise Application Development
• Popular Frameworks: Spring, Hibernate, Strut
• Platform: Web, Mobile, Desktop
• Popularity: #2 on PYPL Popularity Index of March 2021, #2 on
Tiobe Index for March 2021, Loved by 44.1% of
StackExchange developers in 2020.
• What this language is used for —
• Apart from being used to develop robust business
applications, Java has also been used extensively in Android,
making it a prerequisite for Android developers. Java also
allows developers to create apps for a range of industries,
such as banking, electronic trading, e-commerce, as well as
apps for distributed computing.
• 4. C/C++ — Operating Systems and System Tools
• Popular Frameworks: MFC, .Net, Qt, KDE, GNOME
• Platform: Mobile, Desktop, Embedded
• What this language is used for —
• As C & C++ both offer full access to the underlying hardware,
they have been used to create a wide variety of applications
and platforms, such as system applications, real-time
systems, IoT, embedded systems, games, cloud, containers,
and more.
• PHP — Web Development
• Popular Frameworks: CakePHP, LaraVel, Symfony, Phalcon
• Platform: Cross-platform (desktop, mobile, web) Back-end
web scripting.
• Popularity: #6 on PYPL Popularity Index of March 2021, #8 on
Tiobe Index for March 2021.
What this language is used for —
• A large number of companies are using PHP today to create
tools like CMS (Content Management Systems), eCommerce
platforms, and web applications. PHP also makes it extremely
easy to create web pages in an instant.
READING ASSIGNMENT

• CHECK OUT ATLEAST 3 OTHER PROGRAMMING LANGUAGES

You might also like