Winter Exam Flashcards

(27 cards)

1
Q

What are the four key elements of computational thinking?

A

decomposition, pattern recognition, abstraction, and algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is decomposition in computational thinking?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define pattern recognition in the context of computational thinking.

A

Pattern recognition is the process of observing key characteristics, patterns, and trends in the data being considered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does abstraction mean in computational thinking?

A

Abstraction involves removing unnecessary details from a problem that aren’t needed to find a solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an algorithm?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can algorithms be represented visually?

A

Algorithms can be represented using flowcharts and pseudo-code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is decomposition useful when solving problems?

A

Decomposition makes complex problems more manageable by breaking them into smaller, more easily solved sub-problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What role does pattern recognition play in solving problems?

A

Pattern recognition helps identify trends and characteristics in data, which can inform decision-making and solutions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does abstraction contribute to problem-solving?

A

Abstraction simplifies a problem by focusing only on relevant information, making it easier to develop solutions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is the order of instructions important in an algorithm?

A

The order of instructions is crucial because each step builds upon the previous one, and changing the order can affect the outcome.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an execution error?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a logic error?

A

A logic error occurs when the code runs without crashing, but it produces incorrect or unexpected results due to flawed logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are detection techniques for syntax errors?

A

Detection techniques for syntax errors include using an Integrated Development Environment (IDE) that highlights errors as you type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is error trapping?

A

used to handle errors gracefully
by anticipating potential issues
providing a way to manage them without crashing the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How can execution errors be corrected?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why is it important to differentiate between syntax and execution errors?

A

Understanding the difference helps avoid confusion and leads to more effective debugging and error correction.

17
Q

What is exception handling?

A

Exception handling is a method where a program manages run-time errors to prevent crashing by raising exceptions that are handled by specific code.

18
Q

What is the focus of integration testing?

A

Integration testing focuses on the data passed between units and identifies problems with interfaces or interactions.

19
Q

Why is it important to conduct tests in a real-life setting during system testing?

A

Conducting tests in a real-life setting helps identify functionality issues or performance problems under realistic conditions.

20
Q

What arithmetic operations can be performed on variables?

A

Arithmetic operations include addition (+), subtraction (-), multiplication (*), and division (/).

21
Q

What are the two forms of repetition in programming?

A

The two forms of repetition are unconditional and conditional.

22
Q

Explain Append Function

A

writes to data stored in your program into a file, instead of replacing existing data it adds a new row

23
Q

Explain Read Function

A

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

24
Q

Explain Write

A

Writes to data stores in your program into a file to be stored

25
Explain Open
Open function opens an existing file , or if an existing file name does not exist it will create a new file to write to
26
Explain Close
this closes all the file after all actions have been completed, this is crucial because it makes sure data isn't lost
27
What does the language compiler do?
Processes each statement in the source code Translates the program into machine code Checks the syntax of each statement Lexical analysis Semantic analysis Include library code