0% found this document useful (0 votes)
10 views6 pages

? Programming Notes - Grade 8

This document provides an overview of programming languages, distinguishing between textual and visual types, along with their features and examples. It covers key concepts such as Object-Oriented Programming, Visual Basic basics, operators, decision-making structures, and loops. The chapter emphasizes how these concepts aid programmers in writing software and solving problems.

Uploaded by

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

? Programming Notes - Grade 8

This document provides an overview of programming languages, distinguishing between textual and visual types, along with their features and examples. It covers key concepts such as Object-Oriented Programming, Visual Basic basics, operators, decision-making structures, and loops. The chapter emphasizes how these concepts aid programmers in writing software and solving problems.

Uploaded by

merizali1312
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

📘

Programming Notes – Grade 8

1. Programming Languages
A programming language is used to give instructions to a computer so it can
perform tasks.
There are two main types of programming languages:
. Textual Programming Languages
. Visual Programming Languages

2. Textual Programming Languages


Textual programming means writing code using text in an editor or IDE
(Integrated Development Environment).
Features
● Code is written using words, symbols, and commands
● Requires correct syntax
● Gives more control and precision
● Mostly used by professional programmers
Examples of Textual Languages
Assembly Language
● A low-level language
● Very fast and efficient
● Used for operating systems, device drivers, and embedded
systems
● Requires deep knowledge of computer hardware
C++
● A general-purpose programming language
● Used in game development, system software, and scientific
computing
● A compiled language (must be compiled before running)
● Known for speed and performance
Java
● A high-level, object-oriented language
● Platform independent
● Runs on Java Virtual Machine (JVM)
● Used for web development, mobile apps, and enterprise software
Python
● A high-level interpreted language
● Known for simple and readable syntax
● Used in data science, web development, and artificial intelligence
Visual Basic
2
● Easy-to-learn textual programming language
1
● Mainly used to develop Windows applications
● Provides tools to create buttons, text boxes, and forms
3. Visual Programming Languages
Visual programming uses graphical blocks, icons, arrows, and nodes instead
of typing code.
Features
● Drag-and-drop interface
● Easy for beginners
● Interactive and visual
● Fewer syntax errors
Examples
● Scratch
● Blockly
● Mblock
● LOGO
● Roblox

4. Object-Oriented Programming (OOP)


Object-Oriented Programming is a programming method that uses objects to
create programs.
What is an Object?
An object contains:
. Data – information like numbers, text, or pictures
. Actions – things the object can do
Simple Example
Think of building with Lego blocks.
● Each Lego block = object
● Each block has shape and function
● By combining many blocks, we create bigger structures
Similarly, programmers combine objects to build complex programs.

5. Applications of Programming Languages


Textual Programming Uses
Web Development
● HTML
● CSS
● JavaScript
Systems Programming
● C
● C++
● Assembly
Data Science
● Python
● R
Game Development
● C#
● Java

Visual Programming Uses


Robotics
● Scratch
Internet of Things (IoT)
● Node-RED
● Blynk
Game Design
● Unity
● Unreal Engine
User Interface Design
● Adobe XD
● Figma

6. Introduction to Visual Basic


Visual Basic (VB) is a programming language that allows users to create
programs using a drag-and-drop system.
This means you can easily create:
● Buttons
● Text boxes
● Forms
● Interactive applications
Example programs:
● Calculator
● Simple games
● Data entry programs

7. Operators in Visual Basic


An operator tells the computer to perform a mathematical or logical
operation.
Types of Operators
. Arithmetic Operators
. Comparison Operators
. Logical Operators
. Concatenation Operator

8. Arithmetic Operators
Used to perform mathematical calculations.
Operator Function
+ Addition
− Subtraction
* Multiplication
/ Division
^ Power
MOD Returns remainder
+ Addition
− Subtraction
* Multiplication
/ Division
^ Power
MOD Returns remainder
Example
10 MOD 3 = 1

9. Comparison Operators
Used to compare values.
Operator Meaning
= Equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<> Not equal
These operators return True or False.

10. Logical Operators


Logical operators combine conditions.
Operator Meaning
AND Both conditions must be true
OR At least one condition must be true
XOR Only one condition must be true
NOT Reverses the condition
11. Concatenation Operator
The & operator joins two strings together.
Example:
A = "Hello"
B = "World"
A & B = Hello World

12. IF–THEN–ELSE (Decision Making)


Programs sometimes need to make decisions.
The IF-THEN-ELSE statement allows a program to choose between different
actions.
Example
If a number is greater than 100
→ Show message "Correct"
Else
→ Show message "Try Again"
This allows the program to respond to different user inputs.
13. Loops in Programming
A loop repeats a block of code until a condition is met.
Loops are also called iteration statements.

14. FOR NEXT Loop


The FOR NEXT loop is used when we know how many times the loop should
run.
Example:
Display "Hello" 4 times.
Example use:
● Creating multiplication tables
● Repeating messages
Example idea:
Multiply a number entered by the user by numbers 1 to 12 to generate a table.

15. WHILE Loop


The WHILE loop repeats code as long as a condition is true.
It is used when the number of repetitions is not known.
Example:
Repeat the program while the number is less than 10.

16. DO WHILE Loop


The DO WHILE loop checks the condition after executing the code.
This means the loop runs at least once, even if the condition is false.
Example:
Display numbers from 1 to 10 in a list box.

17. Example of a Loop Program


Program goal: Display numbers from 1 to 10
Steps:
. Start number = 1
. Display the number
. Increase number by 1
. Continue until number > 10

18. Input and Output


Programs often use input and output elements.
Input
Information entered by the user.
Example:
● Text box
Output
Results displayed to the user.
Example:
● Message box
● List box
● Label

Summary
In this chapter you learned:
● Types of programming languages
● Textual vs visual programming
● Examples of programming languages
● Object-Oriented Programming (OOP)
● Visual Basic basics
● Operators
● IF–THEN–ELSE decision making
● Loops (FOR, WHILE, DO WHILE)
These concepts help programmers write programs, solve problems, and
create software.

You might also like