Computational thinking, problem-solving and programming
Computational Thinking is a problem-solving method that involves breaking down complex problems into smaller, parts to find solutions using algorithms.
Problem-solving is the process of finding solutions to complex issues.
Programming is writing instructions for computers to execute tasks or solve problems.
Abstraction: Ignore irrelevant details to focus on essential aspects
Decomposition: Breaking down complex problems into smaller parts.
Pattern Recognition: Identifying similarities and differences within parts of a problem.
Algorithm Design: Create a series of steps to solve a problem.
The IB course requires that you learn and understand the following 6 prompts to help you solve problems while thinking and programming.
Thinking procedurally - divide and conquer by breaking up the problem into manageable parts, doing each one separately
Thinking logically - Making decisions and creating conditionals that affect those decisions
Thinking abstractly - Create a model to represent the problem
Thinking ahead - pre-planning
Thinking concurrently - dealing with multiple things at the same time
Thinking recursively - breaking down a complex problem into smaller parts and solving each part after the other until solved.
Program design is the process of planning and creating a structured set of instructions that a computer can follow to solve a specific problem efficiently, often involving algorithms and data structures.
There are typically three techniques used:
Pseudocode: Writing code in a simple way before actual coding
Flow charts: Visual diagrams showing the flow of a process or algorithm
Trace tables: Tables used to track and record the values of variables
The IB course requires you to memorize a couple of algorithms, there are the standard algorithms;
Sequential search: Linear search algorithm that checks each item in a list sequentially.
Binary search: Algorithm that divides the search interval in half at each step.
Bubble sort: A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
Selection sort: A sorting algorithm that selects the smallest element from the unsorted portion and swaps it with the first unsorted element.
Algorithm Efficiency refers to how well an algorithm solves a problem.
It is measured by time complexity (how long it takes to run) and space complexity (how much memory it uses).
Common notations include O(n) for time complexity and O(1) for space complexity.
There are four important rules you need to know when talking about algorithm efficiency.
Add two important steps.
Drop constants.
different inputs use different variables
Drop non-dominant terms
There are many conventions in programming that most programmers should follow. These all improve the readability of the code, which can, in turn, save money, time, and effort for the programmers.
Code layout - Code should follow indents and tabs between braces
Comments - comments should be clear, common, and consistent
Naming - naming should have the same consistency depending on what it is (class, variable, constant, method, etc)
Functions - a function should only perform one job and you can use the function multiple times in the code if needed
High-level languages: Use natural language elements making it easier for programmers to write code. Examples: Python, Java.
Low-level languages: Closer to machine code, more difficult for programmers. Examples: Assembly, Machine code.
Computational Thinking is a problem-solving method that involves breaking down complex problems into smaller, parts to find solutions using algorithms.
Problem-solving is the process of finding solutions to complex issues.
Programming is writing instructions for computers to execute tasks or solve problems.
Abstraction: Ignore irrelevant details to focus on essential aspects
Decomposition: Breaking down complex problems into smaller parts.
Pattern Recognition: Identifying similarities and differences within parts of a problem.
Algorithm Design: Create a series of steps to solve a problem.
The IB course requires that you learn and understand the following 6 prompts to help you solve problems while thinking and programming.
Thinking procedurally - divide and conquer by breaking up the problem into manageable parts, doing each one separately
Thinking logically - Making decisions and creating conditionals that affect those decisions
Thinking abstractly - Create a model to represent the problem
Thinking ahead - pre-planning
Thinking concurrently - dealing with multiple things at the same time
Thinking recursively - breaking down a complex problem into smaller parts and solving each part after the other until solved.
Program design is the process of planning and creating a structured set of instructions that a computer can follow to solve a specific problem efficiently, often involving algorithms and data structures.
There are typically three techniques used:
Pseudocode: Writing code in a simple way before actual coding
Flow charts: Visual diagrams showing the flow of a process or algorithm
Trace tables: Tables used to track and record the values of variables
The IB course requires you to memorize a couple of algorithms, there are the standard algorithms;
Sequential search: Linear search algorithm that checks each item in a list sequentially.
Binary search: Algorithm that divides the search interval in half at each step.
Bubble sort: A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
Selection sort: A sorting algorithm that selects the smallest element from the unsorted portion and swaps it with the first unsorted element.
Algorithm Efficiency refers to how well an algorithm solves a problem.
It is measured by time complexity (how long it takes to run) and space complexity (how much memory it uses).
Common notations include O(n) for time complexity and O(1) for space complexity.
There are four important rules you need to know when talking about algorithm efficiency.
Add two important steps.
Drop constants.
different inputs use different variables
Drop non-dominant terms
There are many conventions in programming that most programmers should follow. These all improve the readability of the code, which can, in turn, save money, time, and effort for the programmers.
Code layout - Code should follow indents and tabs between braces
Comments - comments should be clear, common, and consistent
Naming - naming should have the same consistency depending on what it is (class, variable, constant, method, etc)
Functions - a function should only perform one job and you can use the function multiple times in the code if needed
High-level languages: Use natural language elements making it easier for programmers to write code. Examples: Python, Java.
Low-level languages: Closer to machine code, more difficult for programmers. Examples: Assembly, Machine code.