AP CPSP Mini Quiz #58

Ace your homework & exams now with Quizwiz!

Which of the following changes can be made so that the code segment works as intended?

Interchanging lines 3 and 7

Which of the following best describes the behavior of the procedure?

It displays true if x is negative and displays nothing otherwise.

Which of the following is the most appropriate documentation to appear with the printNums procedure?

Prints all positive odd integers that are less than or equal to max.

Which of the following is the most appropriate documentation to appear with the swapListElements procedure?

Returns a copy of numList with the elements at indices j and k interchanged. The values of j and k must both be between 1 and LENGTH(numList), inclusive.

Which of the following best describes the behavior of the code segment?

The code segment displays the value of 2(5^3) by initializing result to 2 and then multiplying result by 5 a total of three times.

The code segment compares pairs of list elements, setting containsDuplicates to true if any two elements are found to be equal in value. Which of the following best describes the behavior of how pairs of elements are compared?

The code segment iterates through myList, comparing each element to all subsequent elements in the list.

A student is creating an application that allows customers to order food for delivery from a local restaurant. Which of the following is LEAST likely to be an input provided by a customer using the application?

The cost of a food item currently available for order

A company that develops mobile applications wants to involve users in the software development process. Which of the following best explains the benefit in having users participate?

Users can provide feedback that can be used to incorporate a variety of perspectives into the software.

For which of the following contents of myList does the procedure NOT return the intended result?

[-1, 0, 1]

For which of the following values of numCorrect does the code segment NOT display the intended grade?

8,6

A company that develops educational software wants to assemble a collaborative team of developers from a variety of professional and cultural backgrounds. Which of the following is NOT considered a benefit of assembling such a team?

Collaboration that includes diverse backgrounds and perspectives can eliminate the need for software testing.

Which of the following is the most appropriate documentation to appear with the calculate procedure?

Displays the value of (x + y) / x. The value of the parameter x must not be 0.

Three students in different locations are collaborating on the development of an application. Which of the following strategies is LEAST likely to facilitate collaboration among the students?

Having all three students write code independently and then having one student combine the code into a program


Related study sets

ACCT 302 - Shareholders' Equity (Ch 18)

View Set

Chapter 1: Personal Financial Planning in Action

View Set

Digestive Enzyme: Pancreatic Amylase

View Set