What does a variable name mean and what happens when you assign a variable the value of a cell?
A Variable is a named memory location that can hold a value.
You can assign a variable the value of whatever information is stored in a cell. (Like cell B1.)
What is variable assignment vs variable equality?
…
What are the different control structures?
Sequential, Selection, and Repetition
What the four basic decision structures?
•If-then
•If-then-else
•If-then-null-else
•Nested decisions
What does an algorithm include?
Step by step instructions on how to complete a task, involving actions, decisions, inputs and outputs. Think of a recipe!
What is a flowchart?
A visual diagram using standardized symbols to represent algorithms. They make logic easier to understand, debug, and communicate.
Why do we use flowcharts in coding?
Writing a flowchart before writing code helps to simplify it and more smoothly implement it.
True or false: many flow charts are implementation-independent, meaning they describe basic logic without referring to any one programming language.
True!
True or false: most of the “thinking work” of programming happens at the flow chart stage?
True!
What is the formula for the Compound Interest Algorithm?
Balance = Deposit * (1 + Rate) raised to the # years
Can you define algorithm in your own words and give me an example other than a cake recipe?
…
What is a flowchart and why is it useful for programmers and managers?
…
What does it mean for a flowchart to be implementation-independent?
…
According to the text, when does most of the “thinking work” of the programming happen?
In the VBA stage.
True or false: assignments and tests for quality are fundamentally different operations with distinct purposes
True
True or false: when constructing algorithms, it’s often necessary to perform calculations and assigns the results to variables.
True
An assignment in programming is…
As compared to an algorithm which…
A statement that stores a value in a variable. (X = 5) It’s a single step within a larger process.
An algorithm is a complete, step by step procedure for solving a problem or accomplishing a task. It’s a sequence of assignments decisions and other operations that when followed will produce a desired outcome.
True or false:assignments always go from right to left.
True: the operation on the right is completed first, and the result is a sign of a left-hand variable.
Pay = Hours * Rate
A test of the equality is similar to a decision diamond in that it…
Returns either a true or false answer. For example:
IF Today = “Friday” THEN
BALANCE = BALANCE - 50.
So if the test of equality reads true, then the Balance subtracts 50 and the new value is assigned to Balance.
IMPORTANT:
The IF is the equality test. The THEN is the assignment operation that comes after.
When making a variable legend, what’s most important to do?
A-make it easy to read
B-not include a Legend
C-put spaces in your variable names
D-choose arbitrary letters
A-make it easy to read with short meaningful variable names! NEVER put spaces in the variable names (like Net Pay) only Netpay, Net_Pay, or like NetPay
What’s the biggest difference between a Nested Selection and a Selected Case (also known as a switch case)?
A nested Selection involves placing one selection structure inside of another. (Like an If-then-else or Select case) where the second condition only matters if the first condition is met.
Ex: IF a User logged in AND they have administration privileges THEN…
Whereas a Switch statement invlolves defining the conditions of ONE variable or expression and uses Case statements to test in sequence which condition is true. It’s more clean and neat then nested ones
When “prompt” is used as an output, it displays a message to the…
user instead of the variables.
BE SURE to follow it with an Inout symbol specifying the required variable. (The system then makes a decision if, for example, if Input A = ”n”? And either loops or terminates the flowchart.)
Inputs come from two sources:
User entry or store to set up data.
Storing table values in a set up section reduces repeated user entry. When designing a flow chart, determine which inputs must be entered each time and which can be pre-stored.
When would a programmer use “Input” for regular user entry VS “Input-from-setup” for setup data?
Inputs= input obtained from the user each time the algorithm is executed.
Input from setup= input from data stored for frequent repetitive use. These values are not changed each time the program is run.