Intro to Programming Chapter 2

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

True

In a structured program, structures can be stacked or connected to one another only at their start or exit points.

spaghetti

The popular name for logically snarled program statements is ____ code.

go to

Years ago, programmers could avoid using structure by inserting a ____ statement into their pseudocode.

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.

endif

You can use an ____ statement to clearly show where the actions that depend on a decision end.

sequence

A ____ can contain any number of tasks, but there is no chance to branch off and skip any of the tasks.

priming

A ____ input is the statement that reads the first input value in a program.

structure

A ____ is a basic unit of programming logic; each structure is a sequence, selection, or loop.

Block

A group of statements that executes as a single unit is a(n) ____.

while...do

A repetition or iteration loop is known as a(n) ____ structure.

True

A sequence can contain any number of tasks, but there is no chance to branch off and skip any of the tasks.

sequence, selection, and loop

All logic problems can be solved using only the three structures—____.

False

Any program, no matter how complicated, can be constructed using one or more of only four structures.

True

As programs get bigger, they get more confusing if they're not structured.

case

For convenience, many programming languages allow two supplemental structures—the do loop and the ____ structure.

loop

In a ____ structure, you continue to repeat actions while a condition is true.

returns to the question that started the loop

In a loop, if the answer to the question results in the loop being entered and the loop statements executing, then the logic ____.

True

In code, it is perfectly correct for one branch of the selection to be a "do nothing" branch.

exit point

In structured programs, structures can be stacked or connected to one another only at their entry point or ____.

False

Most newer computer languages are unstructured and use syntax that lets you deal efficiently with sequence, selection, and looping.

spaghetti bowl

One way to straighten out an unstructured flowchart segment is to use the "____" method.

nesting

Placing a structure within another structure is called ____.

False

Professional programmers find it just as easy to modify and maintain structured programs as unstructured programs.

True

Programming structures can be combined in an infinite number of ways.

unstructured

Programs that do not follow the rules of structured logic are ____ programs.

spaghetti

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.

goto-less

Some programmers call structured programming ____ programming.

modules

Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers.

indentation

The ____ used in the pseudocode reflects the logic you can see laid out graphically in the flowchart.

loop body

The action or actions that occur within a loop are known as ____.

end-structure

The endif and endwhile statements are know as ____ statements.

selection

The following pseudocode is an example of a ____ structure. if firstNumber is bigger than secondNumber then print firstNumber else print secondNumber

single-alternative selections

The following pseudocode is an example of a ____ structure. if on the beach use sunscreen

Sequence

The following pseudocode is an example of a(n) ____ structure. get firstNumber get secondNumber add firstNumber and secondNumber print result

priming

The purpose of the ____ input step is to control the upcoming loop.

True

Whether you are drawing a flowchart or writing pseudocode, to represent decision outcomes you can use either: Yes and No, or True and False.

selection

With a decision structure or ____ structure you ask a question, and, depending on the answer, you take one of two courses of action.

Sequence

With a(n) ____ structure, you perform an action or task, and then you perform the next action in order.

single-alternative selection

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.

sequence

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.

stacking structures

You are making your favorite cookie recipe. You have all the ingredients on hand. You make the cookies, following the instructions step by step and then deciding to either bake them in the oven or microwave. This is an example of ____.

dual-alternative selection

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.

True

You can replace any individual tasks or steps in a structured flowchart diagram or pseudocode segment with additional structures.

Stacking

____ structures are attached end-to-end.

dual-alternative selections

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.


संबंधित स्टडी सेट्स

Biol 1406 - Chapter 3, Water and Life

View Set

Sloan Man. Fin. Exam 2 Ratio Interpretations

View Set

AP Bio Chapter 8: Photosynthesis

View Set

MRKT 239 Chapter 2 - Study Questions (Exam 1)

View Set

2021 - Unit 1 - General Insurance

View Set

G.1 Choose the topic sentence that best captures the main ide

View Set

Musculoskeletal Trauma and Orthopedic Surgery (Ch. 62)

View Set

Therapeutic Communications Final Study

View Set