0% found this document useful (0 votes)
34 views26 pages

Bridge Course

Uploaded by

brentlexi94
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)
34 views26 pages

Bridge Course

Uploaded by

brentlexi94
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

Introduction to

Programming Language
Content
▪ What is Data and Information
▪ Introduction to Computer Programs
▪ Programming Languages
▪ What is Algorithms and Flow chart
What is Data and Information
What is Data and Information

➤ Definition:
Data is a collection of raw, unprocessed facts and figures that do not carry any specific meaning on their
own.
➤ Nature:
•Data can be quantitative (numbers) or qualitative (text, symbols).
•It is unorganized and not useful until processed.
•Data can be collected through observation, measurement, or research.

➤ Examples:
•Student marks: 85, 90, 78
•Survey responses: "Yes", "No", "Maybe"
•Temperature readings: 30°C, 32°C, 29°C
•Dates: 2025-07-01, 2024-12-31
These numbers or words don't give much meaning until we understand what they are about.
➤ Definition:
Information is processed, organized, and meaningful data that is useful for
decision-making.
➤ Nature:
It is the result of processing data.
Information has context, relevance, and purpose.
It helps in understanding and drawing conclusions.
➤ Examples:
“The average score of Student A is 84.3%.”
“Out of 100 customers, 75 prefer product A.”
“The temperature increased by 2°C over the past week.”
Here, we took raw data, analyzed it, and gave it meaning—now it's information.
Aspect Data Information
Meaningful and
Raw facts without
Meaning useful output from
context
processed data
Numbers, symbols, Sentences, charts,
Form
text, audio, etc. graphs, reports, etc.
Useful for making
Usefulness Not useful alone
decisions
Already processed
Processing Not yet processed
and interpreted
“The average mark
Example 45, 60, 78
is 61”
Collected from
Source various means Derived from data
(sensors, people)
Introduction to Computer Programs
Introduction to Computer Programs

▪ A computer program is a set of instructions written in a programming language that tells


a computer what to do. It is the foundation of all software and applications you use on a
computer or mobile device.
▪ A computer program is a sequence of instructions that a computer can execute to
perform a specific task.
▪ These instructions are written using a programming language such as Python, C, Java,
etc.
▪ The CPU (Central Processing Unit) of a computer follows these instructions to process
data and give desired output.
Why are Computer Programs Important?
▪ Computer programs:
▪ Automate tasks (e.g., payroll system, billing system).
▪ Perform complex calculations (e.g., scientific simulations).
▪ Control hardware (e.g., robot arms, printers).
▪ Power applications (e.g., browsers, games, social media).
▪ Basic Components of a Program
▪ Input – Data the user gives to the program.
▪ Example: Entering two numbers.

▪ Processing – The program performs operations using logic and math.


▪ Example: Adding the numbers.

▪ Output – The result of the processing.


▪ Example: Showing the sum.

▪ Types of Computer Programs


▪ System Software
▪ Manages hardware and system operations (e.g., operating system like Windows, Linux).

▪ Application Software
▪ Helps users perform specific tasks (e.g., MS Word, Excel, Browsers).

▪ Programming Software
▪ Tools used to write and test programs (e.g., compilers, editors like VS Code).
▪ How Computer Programs Work (Basic Flow):
▪ Write Code – Using a language like Python or C++.
▪ Compile/Interpret – Translate the code into machine language.
▪ Execute – CPU executes the instructions step-by-step.
▪ Output Result – Display the result to the user.
Programming Languages
What is Programming Languages

▪ A programming language is a formal language used to communicate instructions to a


computer. It provides a set of rules, syntax, and commands that allow programmers to
write software, control hardware, and solve problems. Programming languages can be
high-level (easy to read and understand, like Python or Java) or low-level (closer to
machine code, like C or Assembly). They are used to develop applications, websites,
games, and more. Examples include Python, Java, C++, and JavaScript. Each language
has its strengths and is suited for different tasks. Without programming languages,
computers cannot understand or execute tasks effectively.
C Programming Language
▪ C is one of the oldest and most basic programming languages. Think of it like learning the
alphabet before writing sentences. It helps you understand how computers really work. You write
step-by-step instructions, and the computer follows them. It’s great for building software like
operating systems. However, you have to manage everything, even memory, on your own. It’s not
easy at first, but it gives a strong foundation for learning other languages.
#include <stdio.h>
int main()
{
printf("Hello, World!");
return 0;
}
C++ – C with Superpowers
▪ C++ is like C, but better and smarter. It adds new features like classes and objects, which
help you organize your code better. This makes it easier to build big and complex programs
like video games or banking systems. C++ lets you do everything C does, but with more
control and structure. It’s powerful, but can be a bit tricky at first. Still, it’s great if you want
to learn how professional software is built.
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!";
return 0;
}
Java – Write Once, Run Anywhere
▪ Java is a popular language used to build all kinds of applications – from mobile apps (like
Android) to big business software. What makes Java special is that it runs the same on any
computer — Windows, Mac, or Linux — because of something called the Java Virtual
Machine (JVM). It uses objects and classes, which help you build clean and reusable code.
Java is secure, reliable, and used by many companies.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
PHP – The Web's Helper
▪ PHP is a language used mainly to build websites that interact with users. For example,
when you fill out a form or log into a website, PHP is often working in the background. It
is easy to mix PHP with HTML, so you can create both the look and the logic of a
website. It’s beginner-friendly and used in popular platforms like WordPress. If you're
interested in building websites, PHP is a great start.
<?php
echo "Hello, World!";
?>
Python – Easy and Powerful
▪ python is one of the easiest languages to learn. It looks like plain English, which is why
schools and colleges teach it first. You can use Python for almost anything — websites,
games, data analysis, artificial intelligence, and even robots! It doesn’t need complicated
symbols or steps. Just write your idea, and Python makes it work. It has a huge library of
tools and a big community to help you.
print("Hello, World!")
What is Algorithms and Flow chart
▪ An algorithm is a step-by-step set of instructions designed to perform a specific task or solve a
particular problem. In computer science, algorithms are used to process data, make decisions,
perform calculations, and automate tasks. Algorithms are written in simple and clear language so
that they can be easily converted into computer programs using any programming language.
▪ For example, an algorithm to add two numbers would include steps like:

Start
Input the first number
Input the second number
Add the numbers
Display the result
Stop
▪ Algorithms must be precise, finite, and effective, meaning they must solve the problem correctly
in a limited number of steps. Good algorithms save time and resources. They are the foundation
of programming and are used in everything from basic apps to complex machine learning
systems.
▪ A flowchart is a visual representation of an algorithm. It uses symbols and arrows to show
the sequence of steps needed to solve a problem or complete a process. Flowcharts make it easy
to understand how a program or process works by showing it in a clear and organized way.
▪ Common flowchart symbols include:
▪ Oval for Start/Stop
▪ Parallelogram for Input/Output
▪ Rectangle for Processes
▪ Diamond for Decisions (Yes/No)
▪ For example, a flowchart to add two numbers would start with an oval labeled “Start,” followed
by steps to take input, add them, display the result, and end with “Stop.” Each step is connected
with arrows showing the flow of actions.
▪ Flowcharts help plan programs before writing code, making debugging and communication
easier. They’re often used by programmers, engineers, and business analysts to design systems.
Flowcharts are especially helpful for beginners to visualize logic and program flow before
coding.
Questions
1. Write an algorithm and draw a flowchart to add two numbers and display the
result.
2. Write an algorithm and draw a flowchart to find the largest of two given
numbers
3. Write an algorithm and draw a flowchart to check whether a number is even or
odd.
4. Write an algorithm and draw a flowchart to find the factorial of a given number
n
5. Write an algorithm and draw a flowchart to check whether a given number is
positive, negative, or zero.
•Start
•Read number A
•Read number B
•Add A and B → store in SUM
•Print SUM
•Stop

You might also like