Networks Notes
Name:_________________ Grade: 6
Subject: Computer Science
Subroutine in an Algorithm
A subroutine (also called a procedure or function) is a separate, reusable block of code or steps in
an algorithm that performs a specific task.
Helps break down complex problems into smaller parts.
Improves readability and reusability.
Can be called multiple times from different places in the main algorithm.
Symbol Name-Elicit
Networks and Data Transmission
Networks are systems of connected devices (like computers, phones, or servers) that
can communicate and share resources.
Data transmission is the process of sending and receiving data (information)
between these devices over the network, either using cables (wired) or wirelessly.
Wireless Data Transmission
Wireless data transmission means sending information without using wires. It uses
signals in the air, like radio waves, to send data between devices.
Examples:
Wi-Fi: Used in homes and schools to connect devices to the internet. It works
well indoors and has a good range.
Bluetooth: Used for short distances like connecting wireless headphones or
speakers. It doesn’t go very far.
Mobile Networks (like 4G and 5G): Used on mobile phones to connect to the
internet without Wi-Fi. It works over long distances.
Infrared: Found in remote controls. It needs a direct line between devices and
only works over a short distance.
Satellite: Used to send signals across very long distances, even around the
world. It is slower but useful in places without cables.
How Websites Are Accessed – URLs and IP Addresses
When you visit a website, your device needs to find where that website lives on the
internet.
A URL is the web address you type in, like www.google.com.
Each website also has an IP address, which is a special number, like a house
address on the internet.
Since numbers are hard to remember, we use URLs instead.
A system called DNS (Domain Name System) helps turn the URL into the IP
address, so your device knows where to go.
DNS converts the easy-to-remember URL (www.youtube.com) into a computer-
friendly IP address (142.250.190.78) so your device can connect to the correct
server.
the user enters a URL into the web browser
the web browser sends the URL to the DNS
the DNS looks for the URL in its database, to find its IP
the DNS sends IP back to the web browser.
The web browser then sends a request to the IP address for the webpage.
It’s like using someone’s name to find their phone number from a phone book!
3. Network Security
Network security helps keep our data safe when we send it over the internet.
A. How Encryption Works
Encryption is a way to hide your data so that only the right person can read it. It turns
your information into secret code. Even if someone tries to look at it, they won’t
understand it unless they have the key to unlock it.
For example, when you send a message or enter your password on a website,
encryption protects it.
B. How to Know a Website Is Safe
When you visit a website, you can check if it’s safe:
Look for a small lock icon next to the web address.
Make sure the web address starts with “https://” – the "s" means secure.
If you see these signs, your connection is protected, and your data is safer.
IP Address (Internet Protocol Address)
An IP address is a unique string of numbers assigned to each device connected to a
network (like your computer, phone, or a website). It works like a digital street
address, telling data where to go and where it came from.
There are two main types:
IPv4: Older format, looks like 192.168.0.1
IPv6: Newer format, looks like 2001:0db8:85a3::8a2e:0370:7334
Each time you visit a website or use an app that connects to the internet, your device
uses IP addresses to find and communicate with servers.
URL (Uniform Resource Locator)
A URL is the full web address used to access a specific page on the internet. It tells
the browser exactly where to find a resource (like a webpage, image, or file) and how
to get it.
Example of a URL:
https://www.example.com/page.html
Parts of a URL:
https:// – protocol (tells how data is sent)
www.example.com – domain name (website name)
/page.html – path (specific file or page)
URLs are human-readable and much easier to remember than IP addresses.
DNS (Domain Name System)
DNS is a system that translates human-friendly website names (like www.google.com)
into IP addresses that computers understand.
When you type a URL into your browser:
1. Your device asks a DNS server for the IP address.
2. The DNS server looks it up and returns the IP address.
3. Your browser uses the IP to connect to the website's server.
Without DNS, we would need to remember the IP addresses of every website we visit.
Bluetooth
Bluetooth is a wireless communication technology that connects devices over short
distances (usually under 10 meters). It uses low-power radio signals and doesn’t need
an internet connection.
Common uses:
Connecting headphones or speakers to a phone
Transferring files between phones
Using wireless keyboards, mice, and game controllers
Bluetooth is useful for quick, easy connections, but not ideal for large data transfers or
long distances.
2.4GHz and 5GHz Wi-Fi
These are the two main frequency bands used by Wi-Fi routers to transmit wireless
signals.
2.4GHz Wi-Fi:
o Slower speeds but longer range
o Better at going through walls and obstacles
o More crowded because many devices use it
5GHz Wi-Fi:
o Faster speeds but shorter range
o Works best in open spaces or close to the router
o Less interference from other devices
Many modern routers support both, allowing devices to switch depending on needs.
3G, 4G, and 5G Cellular Networks
These are generations of mobile communication technologies, used to provide
internet access on mobile phones and other wireless devices.
3G (Third Generation):
o Introduced mobile internet and video calling
o Speeds up to a few Mbps
4G (Fourth Generation):
o Much faster, supports HD streaming and gaming
o Speeds up to 100 Mbps or more
5G (Fifth Generation):
o Extremely fast with low latency (delay)
o Supports smart devices, self-driving cars, and AR/VR
o Speeds over 1 Gbps possible
Each generation is faster and more efficient than the previous one.
Encryption
Encryption is a method of converting data into code to prevent unauthorized access.
It's used to protect sensitive information as it travels over the internet.
How it works:
Before data is sent, it’s encrypted using a special key.
The receiver uses the matching key to decrypt it.
Without the key, the data looks like random characters.
Common uses:
HTTPS websites (secure padlock icon)
Messaging apps like WhatsApp and Signal
Online banking and shopping
Encryption is essential for protecting personal data and privacy.
Programming and System Development in Python
Python is a high-level, interpreted programming language that is widely used for web
development, system development, automation, data science, and more. It's known
for its simple syntax, readability, and versatility.
print() and input() Commands
print() Command:
Purpose: Used to display output to the console.
Syntax:
print("Hello, World!")
You can print:
o Text strings ("Hello")
o Variables (print(x))
o Multiple items (print("Name:", name))
Examples:
print("Python is fun!")
x=5
print("The value of x is", x)
input() Command:
Purpose: Used to get input from the user.
Syntax:
variable = input("Enter something: ")
Note: Input is always received as a string. You must convert it to other types if
needed.
Examples:
name = input("Enter your name: ")
print("Hello", name)
age = int(input("Enter your age: ")) # Convert input to integer
print("You are", age, "years old")
Data Types in Python
Python supports various data types. Here are the basic ones:
Data Type Description Example
int Integer numbers 10, -5, 0
float Decimal numbers 3.14, -2.5
str String (text) "Hello", 'Python'
bool Boolean values True, False
list Ordered collection [1, 2, 3]
tuple Immutable list (1, 2, 3)
dict Key-value pairs {"name": "John",
Data Type Description Example
"age": 30}
set Unordered unique items {1, 2, 3}
Type Conversion:
x = "123"
y = int(x) # y = 123
z = float(x) # z = 123.0
Arithmetic Operators
Arithmetic operators are used to perform mathematical operations.
Operator Name Example Result
+ Addition 5+2 7
- Subtraction 5-2 3
* Multiplication 5*2 10
/ Division (float) 5/2 2.5
// Floor Division 5 // 2 2
% Modulus (remainder) 5%2 1
** Exponentiation 2 ** 3 8
Example Code:
a = 10
b=3
print(a + b) # 13
print(a / b) # 3.333...
print(a // b) # 3
print(a % b) # 1
Types of Errors in Python
Python has different types of errors. Here are the most common ones:
SyntaxError
Caused by incorrect Python syntax.
print("Hello" # Missing closing parenthesis
NameError
Occurs when a variable or function is not defined.
print(x) # x is not defined
TypeError
Occurs when an operation is applied to an inappropriate type.
print("Hello" + 5) # Can't add str and int
ValueError
Occurs when a function gets the right type but inappropriate value.
int("abc") # Cannot convert string to int
ZeroDivisionError
Occurs when dividing by zero.
print(10 / 0)
IndentationError
Python uses indentation to define blocks of code. Incorrect indentation causes
this error.
if True:
print("Hello") # Missing indentation
Case Study: Adding Two Numbers
Scenario:
Aisha wants to create a simple program that adds two numbers entered by the user
and displays the result. She also wants to draw a flowchart and write an algorithm to
show how the program works.
Steps she plans:
1. Start
2. Input first number (A)
3. Input second number (B)
4. Add A and B, store in C
5. Output C
6. End
She decides to use a subroutine called Add(A, B) to perform the addition.
Questions (5 marks total):
a) What are the inputs in Aisha’s algorithm? (1 mark)
b) What is the purpose of the subroutine Add(A, B)? (1 mark)
c) If A = 8 and B = 5, what will be the output? (1 mark)
d) Write any two advantages of using a flowchart. (2 marks)