What are the four key elements of computational thinking?
decomposition, pattern recognition, abstraction, and algorithms
What is decomposition in computational thinking?
Decomposition involves breaking a large, complex problem into smaller sub-problems to provide a solution for each, which can then be combined for an overall solution.
Define pattern recognition in the context of computational thinking.
Pattern recognition is the process of observing key characteristics, patterns, and trends in the data being considered.
What does abstraction mean in computational thinking?
Abstraction involves removing unnecessary details from a problem that aren’t needed to find a solution
What is an algorithm?
An algorithm is a step-by-step set of instructions that specifies how to solve a problem, where the order of the instructions is important.
How can algorithms be represented visually?
Algorithms can be represented using flowcharts and pseudo-code.
Why is decomposition useful when solving problems?
Decomposition makes complex problems more manageable by breaking them into smaller, more easily solved sub-problems.
What role does pattern recognition play in solving problems?
Pattern recognition helps identify trends and characteristics in data, which can inform decision-making and solutions.
How does abstraction contribute to problem-solving?
Abstraction simplifies a problem by focusing only on relevant information, making it easier to develop solutions.
Why is the order of instructions important in an algorithm?
The order of instructions is crucial because each step builds upon the previous one, and changing the order can affect the outcome.
What is an execution error?
An execution error happens when a program runs into an issue during operation, such as dividing by zero or trying to access a non-existent file.
What is a logic error?
A logic error occurs when the code runs without crashing, but it produces incorrect or unexpected results due to flawed logic
What are detection techniques for syntax errors?
Detection techniques for syntax errors include using an Integrated Development Environment (IDE) that highlights errors as you type.
What is error trapping?
used to handle errors gracefully
by anticipating potential issues
providing a way to manage them without crashing the program.
How can execution errors be corrected?
Execution errors can be corrected by reviewing the code logic and ensuring that operations are valid, such as checking for division by zero before performing the operation.
Why is it important to differentiate between syntax and execution errors?
Understanding the difference helps avoid confusion and leads to more effective debugging and error correction.
What is exception handling?
Exception handling is a method where a program manages run-time errors to prevent crashing by raising exceptions that are handled by specific code.
What is the focus of integration testing?
Integration testing focuses on the data passed between units and identifies problems with interfaces or interactions.
Why is it important to conduct tests in a real-life setting during system testing?
Conducting tests in a real-life setting helps identify functionality issues or performance problems under realistic conditions.
What arithmetic operations can be performed on variables?
Arithmetic operations include addition (+), subtraction (-), multiplication (*), and division (/).
What are the two forms of repetition in programming?
The two forms of repetition are unconditional and conditional.
Explain Append Function
writes to data stored in your program into a file, instead of replacing existing data it adds a new row
Explain Read Function
Reads data from txt or csv file so it can be used in your program. Variables will need to be created to store information you have retreived
Explain Write
Writes to data stores in your program into a file to be stored