1 2 3 4 5 6 7 8 9 10 11 12 13 14
Revise later
SpaceTo flip
If confident
All Flashcards
What is the significance of order of operations?
Ensures expressions are evaluated consistently and correctly.
Why is clarity important in algorithms?
Computers follow instructions exactly, so ambiguity leads to errors.
What are the three core concepts of any algorithm?
Sequencing, selection, and iteration.
What is the purpose of parentheses in expressions?
To clarify the order of operations and avoid errors.
What is an algorithm?
A set of instructions to solve a problem or complete a task.
What is sequencing in algorithms?
Steps are executed in the order they appear.
What is an expression in programming?
Anything that returns a single value.
Define the MOD operator.
Gives the remainder after division.
What are code statements?
Individual actions in your program; the building blocks of algorithms.
What is the output of: `print(20 MOD 3)`?
2
What is the output of: `print(5 + 3 * 2)`?
11
What is the output of: `print((5 + 3) * 2)`?
16
What is the output of: `print(16 / 4)`?
4.0
What is the output of: `print(2 * (10 MOD 3))`?
2