M08 Final Exam Part 1 SDEV 120

docx

School

Ivy Tech Community College, Indianapolis *

*We aren’t endorsed by this school

Course

120

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

14

Uploaded by ConstableComputerFerret5232

Report
Question 1 2 / 2 pts Which of the following must always be false? e > 12 OR f > 12 e = 10 OR e = 20 e > 12 AND e < 15 e > 10 AND e < 7 Question 2 2 / 2 pts A group of statements that executes as a unit is a Correct Answers Block Question 3 2 / 2 pts What are nonexecuting statements that programmers place within code to explain program statements in English? trivia user documentation pseudocode comments none of the above Question 4 Not yet graded / 2 pts Define the difference between programming code and scripting. Your Answer: Programming code is a broad term, referring to instructions in languages like Java or C++. Scripting involves writing smaller, interpreted programs in languages like Python or JavaScript, commonly used for automating tasks within existing systems. The distinction is scale, complexity, and purpose, with code associated with extensive software development and scripting with task-specific automation. Question 5
2 / 2 pts Visual Basic, C++, and Java are all examples of computer operating systems. True False Question 6 2 / 2 pts Placing a structure within another structure is called ______________ the structures. stacking tangling building nesting Question 7 2 / 2 pts Which of the following is not a reason for enforcing structure rules in computer programs? Structured programs can be broken down into modules easily Structured programs are clearer to understand than unstructured ones. Structured programs are usually shorter than unstructured ones Other professional programmers will expect programs to be structured Question 8 2 / 2 pts The three structures of structured programming are ______________. Answered Correct Answers sequence, selection, and looping Question 9 0 / 2 pts Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0. Which of the following is an allowed operation? Correct Answer output values[3] values[4] = 0 values[2] = values[4] - values[0] all the above
Question 10 2 / 2 pts Which of the following is not a step that must occur with every correctly working loop? Allow the loop control variable to be altered during each iteration Initialize a loop control variable before the loop starts. Compare the loop control value to a sentinel during each iteration. Set the loop control value equal to a sentinel during each iteration. Question 11 2 / 2 pts The structure that allows you to write one set of instructions that operates on multiple, separate sets of data is the _______________. case Selection Sequence Loop Question 12 Not yet graded / 2 pts From the articles you read in Module 5, describe three techniques used in secure coding. Your Answer: Input Validation checks and cleans user inputs to prevent common security issues like hacking attempts. Authentication and Authorization make sure only authorized users can access certain parts of the software by verifying their identity and permissions. Secure Error Handling handles errors in a way that doesn't reveal sensitive information to potential attackers, keeping the system more secure. Question 13 2 / 2 pts When you _______________, you make sure data items are the correct type and fall within the correct range use object orientation employ offensive programming count loop iterations validate data
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 14 0 / 2 pts A variable's data type describes all of the following except ____________. how the variable is stored in memory the scope of the variable what values the variable can hold what operations can be performed with the variable Question 15 2 / 2 pts The major computer operations include input, process, output True False Question 16 2 / 2 pts When you must perform one action when a condition is true and a different one when it is false, you use a ______________. single-alternative selction dual-alternative selection single-alternative loop dual-alternative loop Question 17 2 / 2 pts The greater-than operator evaluates as true when ______________. the right operand is greater than the left operand Correct! the left operand is greater than the right operand
the right operand is equal to the left operand non of the above Question 18 2 / 2 pts A programming language's rules are its ____________. options format Correct! syntax logic Question 19 2 / 2 pts The parallelogram is the flowchart symbol representing ____________ and ____________. Correct! Correct Answers Input output Question 20 2 / 2 pts In an AND condition, the most efficient technique is to first ask the question that ______________.
Correct! is least likely to be true is most likely to be true that contains the most operands uses a named constant Question 21 2 / 2 pts In a selection, the else clause executes ______________. always Correct! when the tested condition is false when the tested condition is true only after the if clause is executes Question 22 2 / 2 pts When two loops are nested, the loop that is contained by the other is the _______________ loop. Correct! Correct Answers
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
inner Question 23 2 / 2 pts If a is true, b is true, and c is false, which of the following expressions is true? a OR b AND c a AND b OR c a AND b AND c Two of the above Question 24 2 / 2 pts A message that asks a user for input is a(n) ____________. echo prompt comment header none of the above Question 25 2 / 2 pts A dual-alternative structure is not another term for a selection structure. True False Question 26 2 / 2 pts Which of the following is valid advice for naming variables? To avoid conflict with names that others are using, use unusual or unpronounceable names To maintain your independence, shun the conventions of your organization To save typing, make most variable names one or two letters To make names easier to read, separate long names by using underscores or capitalization for each word. Question 27 2 / 2 pts A Caesarian expression can have one of two values, often expressed as true or false.
True False Question 28 2 / 2 pts Two arrays in which each element in one array is associated with the element in the same relative position are _________. hidden Parallel concurrent cohesive Question 29 2 / 2 pts Multiplication has a lower precedence than ____________. division assignment subtraction none of the above Question 30 2 / 2 pts Most programmers use a for loop _______________. when a loop will not repeat for every loop they write when they know the exact number of times a loop will repeat when a loop must repeat many times Question 31 2 / 2 pts If x <= y is true, then ______________. y is always less than or equal to x
x always equals y x is never greater than or equal to y Correct! x is never greater than y Question 32 2 / 2 pts Which of the following attributes do all three basic structures share? They all contain a conditional test They all begin with a process Their flowcharts all contain exactly three processing symbols They all have one entry and one exit point Question 33 2 / 2 pts To take action as long as a condition remains true, you use a ______________ structure. loop sequence selection stack Question 34 2 / 2 pts Suppose that you have declared a numeric array named numbers, and two of its elements are numbers[1] and numbers[4]. You know that _________. the array holds exactly four elements Correct! there are exactly two elements between those two elements
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
the two elements are at the same memory location the two elements hold the same value Question 35 2 / 2 pts Each element in an array must have the same _________ as the others. value ect! data type memory location subscript Question 36 2 / 2 pts In flowcharts or Raptor, the decision symbol is a ____________. Diamond parallelgram rectangle none of the above Question 37 2 / 2 pts A programmer's most important task before planning the logic of a program is to ____________. code the program Correct! understand the problem train the users to use the program
decide which programming language to use Question 38 0 / 2 pts The value added to an accumulator variable is _______________. 0 1 different in each iteration the same for each iteration Question 39 2 / 2 pts A subscript is a(n) _________. number that indicates the position of an array element element in the array number that represents the highest value stored within an array alternate name for an array Question 40 2 / 2 pts In a selection structure, the structure-controlling condition is ______________. tested repeatedly until it is false tested once at the end of the structure tested repeatedly until it is true Correct! tested once at the beginning of the structure Question 41 2 / 2 pts
A counter keeps track of _______________. the number of times software has been revised the number of loop structures within a program the number of machine cycles required by a segment of a program Correct! the number of times an event has occurred Question 42 2 / 2 pts Adding 1 to a variable is also called _______________ it. Correct! Correct Answers incrementing Question 43 2 / 2 pts A hierarchy chart tells you ____________. which modules call other modules What tasks are to be performed within each program module when a module executes all of the above none of the above Question 44 2 / 2 pts When a loop executes, the structure-controlling condition is ______________. tested only if it is true, and not asked if it is false never tested more than once tested either before or after the loop body executes tested exactly once
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 45 0 / 4 pts In the following pseudocode, what percentage raise will an employee in Department 8 receive? if department < 2 then Raise = SMALL_RAISE else if department < 6 then raise = MEDIUM_RAISE else if department < 10 then raise = BIG_RAISE endif endif endif nswered MEDIUM_RAISE SMALL_RAISE BIG-RAISE impossible to tell Question 46 4 / 4 pts In the following pseudocode, what percentage raise will an employee in Department 10 receive? if department < 5 then Raise = SMALL_RAISE else if department <=9 then raise = MEDIUM_RAISE else if department > 9 then raise = BIG_RAISE endif endif
endif BIG_RAISE SMALL_RAISE MEDIUM_RAISE IMPOSSIBLE TO TELL Question 47 Not yet graded / 4 pts Name and describe the steps in the software development cycle. Your Answer: 1. requirements gathering: understand project needs. 2. planning: create a timeline and resource plan. 3. design: develop a blueprint for the software. 4. implementation: write the actual code. 5. testing: identify and fix bugs. 6. deployment: release the software. 7. maintenance: address post-deployment issues and provide updates.