CMIS 130 Quiz 2

¡Supera tus tareas y exámenes ahora con Quizwiz!

You can use an ____ statement to clearly show where the actions that depend on a decision end. 1. end 2. else (not) 3. endif 4. if

endif

In structured programs, structures can be stacked or connected to one another only at their entry point or ____. 1. endif statement (not) 2. connection point 3. end point 4. exit point

exit point

Placing a structure within another structure is called ____. 1. stacking 2. nesting 3. including 4. cascading

nesting

A ____ can contain any number of tasks, but there is no chance to branch off and skip any of the tasks. 1. selection 2. sequence 3. decision 4. case

sequence

All logic problems can be solved using only the three structures—____. 1. sequence, assignment, and loop 2. sequence, selection, and loop 3. sequence, loop, and assignment 4. selection, loop, and assignment

sequence, selection, and loop

Some programmers call structured programming ____ programming. 1. "go-to" 2. "goto-less" 3. procedural (not) 4. branching (not)

"goto-less"

____ structures are attached end-to-end. 1. Stacking 2. Selecting 3. Connecting 4. Building

Stacking

A group of statements that executes as a single unit is a(n) ____. 1. module 2. unit 3. bunch 4. block

block

For convenience, many programming languages allow two supplemental structures—the do loop and the ____ structure. 1. process (not) 2. crate 3. case 4. more (more)

case

Case-Based Critical Thinking Questions: Case 1 You are making your favorite cookie recipe. You have all the ingredients on hand. You realize that the recipe has both the instructions for baking the cookies in the oven or the microwave. This is an example of a ____ structure. 1. sequence 2. single-alternative selection 3. dual-alternative selection 4. loop

dual-alternative selection

if-else examples can also be called ____, because they contain the action taken when the tested condition is true and the action taken when it is false. 1. do loops 2. repetition 3. single-alternative selections 4. dual-alternative selections

dual-alternative selections

The endif and endwhile statements are know as ____ statements. 1. end-structure 2. end-decision 3. end-loop 4. end-module

end-structure

Years ago, programmers could avoid using structure by inserting a ____ statement into their pseudocode. 1. go to 2. go sub 3. branch (not) 4. jump

go to

The ____ used in the pseudocode reflects the logic you can see laid out graphically in the flowchart. 1. shape 2. indentation 3. font 4. color

indentation

In a ____ structure, you continue to repeat actions while a condition is true. 1. sequence 2. loop 3. selection 4. decision

loop

You are making your favorite cookie recipe. You have all the ingredients on hand. Every day, you bring two cookies to work until you run out of cookies at home. This is an example of a ____ structure. 1. sequence 2. single-alternative selection 3. dual-alternative selection 4. loop

loop

The action or actions that occur within a loop are known as ____. 1. loop workings 2. loop body 3. action body 4. inner workings

loop body

Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers. 1. processes 2. modules 3. units 4. pieces

modules

A ____ input is the statement that reads the first input value in a program. 1. priming 2. starting 3. begin 4. sentinel

priming

The purpose of the ____ input step is to control the upcoming loop. 1. sentinel 2. start 3. begin 4. priming

priming

In a loop, if the answer to the question results in the loop being entered and the loop statements executing, then the logic ____. 1. goes to the next statement 2. returns to the top of the sequence 3. returns to the question that started the loop 4. returns to the controlling unit

returns to the question that started the loop

The following pseudocode is an example of a ____ structure. if firstNumber is bigger than secondNumber then print firstNumber else print secondNumber 1. sequence 2. selection 3. spaghetti 4. loop

selection

With a decision structure or ____ structure you ask a question, and, depending on the answer, you take one of two courses of action. 1. loop 2. branch 3. selection 4. logic

selection

Case-Based Critical Thinking Questions: Case 1 You are making your favorite cookie recipe. You have all the ingredients on hand. You follow the recipe step by step. This is an example of a ____ structure. 1. sequence 2. selection 3. while 4. loop

sequence

The following pseudocode is an example of a(n) ____ structure. get firstNumber get secondNumber add firstNumber and secondNumber print result 1. decision 2. task 3. selection 4. sequence

sequence

With a(n) ____ structure, you perform an action or task, and then you perform the next action in order. 1. loop 2. decision 3. assignment 4. sequence

sequence

Case-Based Critical Thinking Questions: Case 1 You are making your favorite cookie recipe. You have all the ingredients on hand. One of your friends at work eats one of your cookies and says it would be great if you could bring more of these cookies to the Monday status meeting. If it is Sunday night, you make the cookies for Monday's meeting. This is an example of a ____ structure. 1. sequence 2. single-alternative selection 3. dual-alternative selection (not) 4. loop

single-alternative selection

The following pseudocode is an example of a ____ structure. if on the beach use sunscreen 1. do loop 2. repetition 3. single-alternative selections 4. dual-alternative selections

single-alternative selections

Programs that use ____ code are so difficult to alter that when improvements are required, developers often find it easier to abandon the existing program and start from scratch. 1. preplanned 2. spaghetti 3. structured 4. rapid

spaghetti

The popular name for logically snarled program statements is ____ code. 1. noodle 2. meatloaf 3. spaghetti 4. puzzle

spaghetti

One way to straighten out an unstructured flowchart segment is to use the "____" method. 1. detective (not) 2. spaghetti code (not) 3. pasta bowl 4. spaghetti bowl

spaghetti bowl

A ____ is a basic unit of programming logic; each structure is a sequence, selection, or loop. 1. structure 2. block 3. program (not) 4. subprogram

structure

Programs that do not follow the rules of structured logic are ____ programs. 1. structured 2. scrambled 3. unstructured 4. disorganized

unstructured

A repetition or iteration loop is known as a(n) ____ structure. 1. while...do 2. do...while 3. if...do 4. do...if

while...do


Conjuntos de estudio relacionados

Preventive Dentistry & Nutrition

View Set

chapter 10 (the water-soluble vitamins) understanding nutrition

View Set

Pharmacology unit 2 IV formulas math problems, dosage calc verifying safe dose

View Set

Chapter 6: Values, Ethics, and Advocacy

View Set