|
3.1 | 3.2 | 3.4 | 3.6 | 3.7 | 3.8 | 3.10 | 3.10v2 | 3-10tri3 | 3.11 | 3.15 | 3.17 | 3.18 |
| 5.1 | 5.2 | 5.3 | 5.4 | 5.5 | 5.6 |
Tri 1 Summary Of My Learning
Variables:
A variable acts as a storage location for data, allowing a programmer to use and manipulate that data easily by referring to the variable name instead of the actual value.
Data Abstraction:
Data abstraction involves simplifying complex data structures by focusing only on the necessary details while underlying others. This allows programmers to work with data in a more efficient and understandable way, without needing to manage all the details of how the data is processed.
Mathematical Expressions:
Mathematical expressions are combinations of numbers, variables, and mathematical operators (such as +, -, *, or /) that produce a result when evaluated. In programming, these expressions are used to perform calculations, solve problems, and manipulate numerical data.
Strings:
A string is a sequence of characters used to represent text in programming. Strings can contain letters, numbers, and symbols, and are often used to store and manipulate textual data like words, sentences, or even entire paragraphs.
Booleans:
Booleans represent one of two possible values: true or false. In programming, boolean values are used to make decisions or control the flow of a program by evaluating conditions or expressions that result in a true or false outcome.
Conditionals:
Conditionals are statements in programming that allow decisions to be made based on whether a certain condition is true or false. If the condition is true, the program executes a specific block of code and if it is false, the program may execute a different block or skip the execution entirely.
Nested Conditionals:
Nested conditionals occur when one conditional statement is placed inside another. This allows for more complex decision-making processes, like evaluating multiple conditions. The program will first check the outer condition, and if it is true, it will then evaluate the inner condition.
Iteration:
Iteration is the process of repeatedly executing a block of code. This is typically done using loops, which allow a program to repeat a set of instructions a specified number of times or until a certain condition is met.
Lists:
A list is a data structure that stores multiple values in a single variable. Lists can contain any type of data, including numbers, strings, or even other lists. They allow programmers to organize and manage collections of data, making it easier to access, modify, or iterate over the values stored within them.
Big Idea 3: Algorithms and Programming
Lesson 3.1: Variables and Assignment
Summary:
Variables are used to store data values that can change throughout the program. They help make programs flexible, readable, and efficient.
Key Concepts:
- Variables are created using the assignment operator
=. - A variable name should be descriptive (e.g.,
score,temperature) and follow naming conventions (no spaces, must start with a letter or underscore). - Values assigned can be updated and reused.
Example Code:
age = 16
print(age) # Output: 16
age = age + 1
print(age) # Output: 17
Resources:
Lesson 3.2: Data Types and Input
Summary:
Understanding data types allows you to handle and process user input correctly.
Key Concepts:
- Python’s common data types:
int(integer),float(decimal),str(string),bool(true/false). - The
input()function takes input as a string by default. - Use type casting (
int(),float(),str(),bool()) to convert between types.
Example Code:
name = input("Enter your name: ")
print("Hello, " + name)
age = int(input("Enter your age: "))
print("In 5 years you will be", age + 5)
Resources:
Lesson 3.4: Operators and Expressions
Summary:
Operators are symbols that perform operations on variables and values. Expressions combine these to compute results.
Key Concepts:
- Arithmetic Operators:
+,-,*,/,//,%,** - Comparison Operators:
==,!=,<,>,<=,>= - Logical Operators:
and,or,not— used in conditionals
Example Code:
x = 10
y = 3
print(x % y) # Output: 1
print(x > y and x < 20) # Output: True
Resources:
Lesson 3.6 – 3.8: Conditionals & If Statements
Summary:
Conditionals allow a program to choose between different paths of execution depending on whether a condition is true or false.
Key Concepts:
if,elif, andelsestructure logic flow- Conditions evaluate to a boolean (
TrueorFalse) - Nesting allows checking multiple conditions
Example Code:
temp = 90
if temp > 100:
print("Too hot!")
elif temp < 60:
print("Too cold!")
else:
print("Just right.")
Resources:
Lesson 3.10: Iteration
Summary:
Loops automate repetitive tasks, allowing code to execute multiple times based on a condition or over a sequence.
Key Concepts:
forloops are used to iterate over sequences like lists or ranges.whileloops run until a condition becomes false.- Loops need exit conditions to avoid infinite repetition.
Example Code:
# For loop
for i in range(5):
print("Loop iteration", i)
# While loop
count = 0
while count < 5:
print("Counting:", count)
count += 1
Resources:
Self Study: Functions
Summary:
Functions are reusable blocks of code that perform a specific task. They help make programs modular and organized.
Key Concepts:
- Define with
defkeyword - Can accept parameters and return values
- Variables inside functions are local by default
Example Code:
def greet(name):
return "Hello, " + name
message = greet("Anvay")
print(message) # Output: Hello, Anvay
Resources:
Big Idea 5: Impact of Computing
Lesson 5.1: Beneficial and Harmful Effects
Summary:
Computing innovations have transformed communication, education, business, and healthcare. However, these innovations can also cause harm when misused or implemented without considering ethical consequences.
Key Concepts:
- Benefits:
- Automates repetitive tasks and increases productivity
- Enhances communication (email, video calls, messaging)
- Provides access to global information and learning
- Harms:
- Algorithms may reflect and reinforce societal biases
- Automation may displace workers and lead to job loss
- Personal data may be tracked or exploited
Example Scenario:
AI used in hiring may speed up decisions, but if trained on biased data, it might favor certain groups unfairly.
Resources:
Lesson 5.2: Digital Divide
Summary:
The digital divide describes the unequal access to computing technologies across different regions or socioeconomic groups. It affects education, job opportunities, and participation in a digital society.
Key Concepts:
- Global Divide: Countries without reliable internet or electricity
- Local Divide: Families lacking devices or stable Wi-Fi connections
- Equity Initiatives:
- Public libraries and school laptop programs
- Broadband expansion projects
- Nonprofit and government efforts
Example Scenario:
Students in rural or low-income areas may not have reliable access to online classes, causing them to fall behind academically.
Resources:
Lesson 5.3: Bias in Computing
Summary:
Computing systems can unintentionally inherit bias from the data used to build them. This can lead to unfair treatment or discrimination in real-world applications.
Key Concepts:
- Biased training data can produce biased models
- Examples include facial recognition errors and loan denial algorithms
- Solutions include using diverse data, testing for fairness, and transparent design
Example Scenario:
A healthcare AI tool recommends fewer services for certain populations due to a lack of representation in the training data.
Resources:
Lesson 5.4: Crowdsourcing
Summary:
Crowdsourcing is the process of gathering information or work from a large group of people, typically via the internet. It allows large-scale collaboration, but it can also raise ethical concerns.
Key Concepts:
- Used in platforms like Wikipedia, reCAPTCHA, and Galaxy Zoo
- Helps with tasks too big for individuals or small teams
- Must balance usefulness with potential misuse (e.g., unpaid labor, misinformation)
Example Scenario:
Users labeling images for a machine learning project may not realize their work is training an AI used for commercial profit.
Resources:
Lesson 5.5: Randomness
Summary:
Randomness is used in computing for simulations, games, and security. It adds unpredictability and mimics chance in programs.
Key Concepts:
- Used in simulations (e.g., predicting weather), games (e.g., dice rolls), and security (e.g., password generation)
- Python provides the
randommodule for generating random values - Computers use pseudorandom number generators (PRNGs)
Example Code:
import random
print(random.randint(1, 6)) # Simulates a dice roll from 1 to 6
Resources:
Lesson 5.6: Legal and Ethical Concerns
Summary:
Technology is governed by laws that protect user rights and define ethical practices. Understanding these helps developers build responsible and legal computing systems.
Key Concepts:
- Legal Protections:
- GDPR: Protects user data and requires consent in the EU
- DMCA: Prevents illegal copying or distribution of digital content
- COPPA: Protects children’s privacy online
- Ethical Practices:
- Do not collect unnecessary personal data
- Respect intellectual property and give proper credit
- Inform users how their data is used
Example Scenario:
A company stores children’s data without parental consent, violating COPPA.
Resources:
Lesson 5.7: Safe Computing
Summary:
Safe computing means protecting yourself, your device, and your data from digital threats. It involves using secure practices and staying alert.
Key Concepts:
- Use strong passwords and enable two-factor authentication
- Avoid clicking suspicious links or opening unknown attachments
- Install antivirus software and keep your system updated
- Backup important data regularly
Checklist:
- Use a password manager
- Don’t reuse the same password across accounts
- Only download software from trusted sources
- Lock your devices when not in use
Resources:
%.