Chapter 10-Flowcharts And Algorithms Flashcards

(32 cards)

1
Q

What does a variable name mean and what happens when you assign a variable the value of a cell?

A

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.)

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

What is variable assignment vs variable equality?

A

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

What are the different control structures?

A

Sequential, Selection, and Repetition

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

What the four basic decision structures?

A

•If-then
•If-then-else
•If-then-null-else
•Nested decisions

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

What does an algorithm include?

A

Step by step instructions on how to complete a task, involving actions, decisions, inputs and outputs. Think of a recipe!

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

What is a flowchart?

A

A visual diagram using standardized symbols to represent algorithms. They make logic easier to understand, debug, and communicate.

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

Why do we use flowcharts in coding?

A

Writing a flowchart before writing code helps to simplify it and more smoothly implement it.

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

True or false: many flow charts are implementation-independent, meaning they describe basic logic without referring to any one programming language.

A

True!

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

True or false: most of the “thinking work” of programming happens at the flow chart stage?

A

True!

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

What is the formula for the Compound Interest Algorithm?

A

Balance = Deposit * (1 + Rate) raised to the # years

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

Can you define algorithm in your own words and give me an example other than a cake recipe?

A

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

What is a flowchart and why is it useful for programmers and managers?

A

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

What does it mean for a flowchart to be implementation-independent?

A

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

According to the text, when does most of the “thinking work” of the programming happen?

A

In the VBA stage.

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

True or false: assignments and tests for quality are fundamentally different operations with distinct purposes

A

True

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

True or false: when constructing algorithms, it’s often necessary to perform calculations and assigns the results to variables.

17
Q

An assignment in programming is…
As compared to an algorithm which…

A

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.

18
Q

True or false:assignments always go from right to left.

A

True: the operation on the right is completed first, and the result is a sign of a left-hand variable.
Pay = Hours * Rate

19
Q

A test of the equality is similar to a decision diamond in that it…

A

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.

20
Q

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

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

21
Q

What’s the biggest difference between a Nested Selection and a Selected Case (also known as a switch case)?

A

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

22
Q

When “prompt” is used as an output, it displays a message to the…

A

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.)

23
Q

Inputs come from two sources:

A

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.

24
Q

When would a programmer use “Input” for regular user entry VS “Input-from-setup” for setup data?

A

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.

25
What are the different output names and what do they mean?
Display displays results to the screen. Prompt asks for inputs from the user. The prose of the prompt should be in quotation marks. The Print prints it to paper.
26
What are the different output names and what do they mean?
Display displays results to the screen. Prompt asks for inputs from the user. The prose of the prompt should be in quotation marks. The Print prints it to paper.
27
What is a loop termination table used for?
To track variable values and logical tests during loop execution to visualize and debug termination conditions. It really helps to track numbers and provide a visual as to When a process should terminate correctly. (Or under what conditions.)
28
Incorrect termination leads to:
• running too many times: incorrect results or infinite loops. •Running too few times: in complete results.
29
What are the 2 Common Types of Logical Processes?
Boolean (true or false) -Direct Evaluation (check if it’s true or false) -Negation: Use ‘Not’ to check the opposite condition String -Equality Check: compare strings directly for exact matches
30
True or false: columns should match the order of operations within the loop to avoid misleading values.
True!
31
What are the Variable Data Types?
•String-alphanumeric text. (No math.) •Integer-whole numbers. (Math.) •Decimal (math.) •Boolean (stores true or false) •Currency-Money •Dates-Dates So, “Dim i As Integer” means Designate this storage container as meant for “i” organized by Integer
32
What does Dimension do?
It declares the variable data type!