Understanding Algorithms unit 1 Flashcards
(11 cards)
What is an algorithm?
A step by step process of solving a problem.
What are algorithms used for?
To plan and describe how a task or problem should be solved step-by-step.
In what forms can algorithms be represented?
Written descriptions, flowcharts, and pseudocode.
What is pseudocode?
A structured, code-like way of writing an algorithm that is easy to understand and can be translated into actual program code.
What is a flowchart in the context of algorithms?
A diagram that shows the sequence of steps in an algorithm using symbols like arrows, ovals, and rectangles.
What are arithmetic operators used for?
To perform mathematical calculations in an algorithm or program.
List 5 common arithmetic operators.
+ (add), - (subtract), * (multiply), / (divide), % (modulus/remainder)
What is a variable?
A container used to store data that can change during program execution.
What is a constant?
A container for data whose value does not change during program execution.
Why should you use descriptive names for variables and constants?
It makes the code easier to read and understand.
How can an algorithm be turned into a program?
By writing the steps of the algorithm as code in a high-level programming language (like Python, Java, etc.).