PBL Unit 1 / Week 7
- Algorithms are step-by-step procedures or sets of rules used to solve problems or perform tasks
- Also known as sequencing
- Step 1, Step 2, Step 3…(in order)
- Ex: putting on clothes one at a time in the morning, washing dishes, etc.
- Also known as sequencing
- Selection
- Decision to make based on a given circumstance
- Ex: is it raining? If so, bring an umbrella outside
- Decision to make based on a given circumstance
- Iteration
- Also referred to as repetition
- After performing steps of a procedure/problem, iteration means checking to see if a task is completed
- Refers back accordingly
- Algorithms can be represented using flowcharts, Pseudo Code, or programming languages
- Conditional statements
- Conditional statements (if-else statements) allow a program to make decisions based on certain conditions
- Enable different code branches to be executed depending on whether a condition is true or false
- Loops
- Loops (for loops, while loops) enable repetitive execution of code
- They are used when a set of instructions needs to be repeated multiple times.
- Strings
- A string is a data type used to represent text or sequences of characters
- Strings are commonly used in programming for tasks like input/output and text processing