Cs Revision Notes
Cs Revision Notes
Here's the content without any hashtags so you can paste it into your
notes smoothly:
Computer Security
Definition:
Computer security refers to protecting systems from unauthorized access,
attacks, or damage. It ensures the confidentiality, integrity, and availability of
data.
Key Terms:
- Hacking – Illegally accessing or modifying computer files without permission.
- Malware – Malicious software designed to harm, exploit, or disrupt systems.
- Viruses – A type of malware that replicates and spreads without user consent.
- Unauthorized Access and Modification – When someone illegally accesses or
alters files.
- Firewall – A security system that monitors and controls incoming and
outgoing network traffic.
- Spyware – A type of malware that gathers information about a user without
consent.
- Adware – Software that displays unwanted advertisements.
Common Threats:
- Logic Bombs – Malicious code that activates when certain conditions are met.
- Ransomware – A type of malware that locks a user’s files and demands
payment to unlock them.
- Trojan Horse – A virus disguised as legitimate software.
- Phishing – Fraudulent attempts to obtain sensitive information via emails or
fake websites.
- Advanced Fee Fraud – A scam where a victim is promised a large sum of
money in exchange for a small payment.
Identity Theft:
- Occurs when criminals access personal data to impersonate someone.
- They may apply for bank loans, credit cards, or commit fraud in your name.
- Minimizing risk:
- Avoid sharing personal data online.
- Use privacy settings on social media.
- Be cautious of phishing emails.
Employer Responsibilities:
- Provide adjustable chairs and desks.
- Ensure proper lighting to reduce glare.
- Allow frequent breaks to prevent fatigue.
E-Waste:
- Old electronic devices contribute to hazardous waste.
- Recycling options:
- Return to Manufacturer – Some companies offer trade-in programs.
- Donate to charity – Old computers can be reused.
- Professional disposal services – Ensures safe and legal disposal.
Python Programming
Variables:
- Definition: A storage location in memory used to store data that can change.
- Rules for Naming Variables:
- Can contain letters, numbers, and underscores.
- Cannot start with a number.
- Cannot use reserved Python keywords (e.g., class, def).
Data Types:
- String (str) – Holds text ("Hello").
- Integer (int) – Holds whole numbers (5, 100).
- Float (float) – Holds decimal numbers (3.14).
- Boolean (bool) – Holds True or False.
Arithmetic Operators
- Addition (+) – 2 + 3 = 5
- Subtraction (-) – 5 - 3 = 2
- Multiplication (*) – 4 * 2 = 8
- Division (/) – 10 / 2 = 5.0
- Floor Division (//) – 10 // 3 = 3
- Modulus (%) – 10 % 3 = 1
Functions
Example:
```python
def greet(name):
print("Hello, " + name)
greet("Alice")
```
Pseudocode
Iteration (Loops)
---
Flowcharts
Definition:
A flowchart is a graphical representation of an algorithm, using symbols and
arrows.
Flowchart Symbols:
- Oval → Start/End.
- Parallelogram → Input/Output.
- Rectangle → Process (calculation, assignment).
- Diamond → Decision (True/False conditions).
Search Algorithms
Linear Search:
- Checks each item one by one from start to end.
- Simple but inefficient for large datasets.
Random Search:
- Selects random items and checks if they match the target.
- Highly inefficient as it relies on luck.
Binary Search:
- Only works on sorted lists.
- Finds the midpoint and compares it to the target.
- Repeats in the lower or upper half until the item is found.
- More efficient than linear search.
Now it's fully clean for pasting into your notes! Let me know if you need any
final tweaks.