100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

AP CSP Semester 1 Exam 100% CORRECT ANSWERS

Rating
-
Sold
-
Pages
34
Grade
A+
Uploaded on
12-12-2023
Written in
2023/2024

Consider the following code segment. Which of the following best describes the behavior of the code segment? - ANSWERS 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. In the following procedure, assume that the parameter x is an integer. Which of the following best describes the behavior of the procedure? - ANSWERS It displays true if x is negative and displays nothing otherwise. 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? - ANSWERS Collaboration that includes diverse backgrounds and perspectives can eliminate the need for software testing. Central High School keeps a database of information about each student, including the numeric variables numberOfAbsences and gradePointAverage. The expression below is used to determine whether a student is eligible to receive an academic award. (numberOfAbsences ≤ 5) AND (gradePointAverage > 3.5) Which of the following pairs of values indicates that a student is eligible to receive an academic award? - ANSWERS numberOfAbsences = 5, gradePointAverage = 3.8 DineOutHelper is a mobile application that people can use to select a restaurant for a group meal. Each user creates a profile with a unique username and a list of food allergies or dietary restrictions. Each user can then build a contact list of other users of the app. A user who is organizing a meal with a group selects all the members of the group from the user's contact list. The application then recommends one or more nearby restaurants based on whether the restaurant can accommodate all of the group members' allergies and dietary restrictions. Suppose that Alejandra is using DineOutHelper to organize a meal with Brandon and Cynthia. Which of the following data are needed for DineOutHelper to recommend a restaurant for the group? Each group member's list of food allergies or dietary restrictions Alejandra's geographic location The usernames of the people on Brandon and Cynthia's contact lists - ANSWERS I and II only

Show more Read less
Institution
AP CSP
Course
AP CSP











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
AP CSP
Course
AP CSP

Document information

Uploaded on
December 12, 2023
Number of pages
34
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

AP CSP Semester 1 Exam Consider the following code segment. Which of the following best describ es the behavior of the code segment? - ANSWERS 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. In the following procedure, assume that the parameter x is an integer. Which of the following best describes the behavior of the procedure? - ANSWERS It displays true if x is negative and displays nothing otherwise. A company that develops educational software wants to assemble a collaborative team of developers from a variety o f professional and cultural backgrounds. Which of the following is NOT considered a benefit of assembling such a team? - ANSWERS Collaboration that includes diverse backgrounds and perspectives can eliminate the need for software testing. Central High Sc hool keeps a database of information about each student, including the numeric variables numberOfAbsences and gradePointAverage. The expression below is used to determine whether a student is eligible to receive an academic award. (numberOfAbsences ≤ 5) AN D (gradePointAverage > 3.5) Which of the following pairs of values indicates that a student is eligible to receive an academic award? - ANSWERS numberOfAbsences = 5, gradePointAverage = 3.8 DineOutHelper is a mobile application that people can use to sel ect a restaurant for a group meal. Each user creates a profile with a unique username and a list of food allergies or dietary restrictions. Each user can then build a contact list of other users of the app. A user who is organizing a meal with a group sele cts all the members of the group from the user's contact list. The application then recommends one or more nearby restaurants based on whether the restaurant can accommodate all of the group members' allergies and dietary restrictions. Suppose that Alejand ra is using DineOutHelper to organize a meal with Brandon and Cynthia. Which of the following data are needed for DineOutHelper to recommend a restaurant for the group? Each group member's list of food allergies or dietary restrictions Alejandra's geographic location The usernames of the people on Brandon and Cynthia's contact lists - ANSWERS I and II only DineOutHelper is a mobile application that people can use to select a restaurant for a group meal. Each user creates a profile with a unique username and a list of food allergies or dietary restrictions. Each user can then build a contact list of other users of the app. A user who is organizing a meal with a group selects all the members of the group from the user's contact list. The application then recommends one or more nearby restaurants based on whether the restaurant can accommodate all of the group members' allergies and dietary restrictions. Suppose that Alejandra is using DineOutHelper to organize a meal with Brandon and Cynth ia. Which of the following data is not provided by Alejandra but is necessary for DineOutHelper to recommend a restaurant for the group? Brandon's contact list Information about which restaurants Brandon and Cynthia have visited in the past Information abo ut which food allergies and dietary restrictions can be accommodated at different restaurants near Alejandra - ANSWERS III only A programmer wrote the program below. The program uses a list of numbers called numList. The program is intended to display th e sum of the numbers in the list. In order to test the program, the programmer initializes numList to [0, 1, 4, 5]. The program displays 10, and the programmer concludes that the program works as intended. Which of the following is true? - ANSWERS The co nclusion is incorrect; using the test case [0, 1, 4, 5] is not sufficient to conclude the program is correct. D The upgraded system uses a directory containing additional information not supplied by the customer. The directory is used to help direct calls effectively. Which of the following is LEAST likely to be included in the directory? - ANSWERS A list of computers the company owns and the computers' corresponding IP addresses To direct a call to the appropriate destination, which of the following inp ut data is needed by the upgraded system that was NOT needed by the original system? Audio signal of the customer's voice The customer's keypad selection The customer's phone number - ANSWERS I only In the following procedure, the parameter max is a posi tive integer. PROCEDURE printNums(max) { count ← 1 REPEAT UNTIL(count > max) { DISPLAY(count) count ← count + 2 } } Which of the following is the most appropriate documentation to appear with the printNums procedure? - ANSWERS Prints all positive odd integers that are less than or equal to max. In the following procedure, the parameters x and y are integers. Which of the following is the most appropriate documentation to appear with the calculate procedure? - ANSWERS D isplays the value of (x + y) / x. The value of the parameter x must not be 0. In the following procedure, the parameter numList is a list of numbers and the parameters j and k are integers. PROCEDURE swapListElements(numList, j, k) { newList ← numList newList[j] ← numList[k] newList[k] ← numList[j] RETURN(newList) } Which of the following is the most appropriate documentation to appear with the swapListElements procedure? - ANSWERS Returns a copy of numList with the elements at indices j and k interchange d.The values of j and k must both be between 1 and LENGTH(numList), inclusive The following procedure is intended to return the number of times the value val appears in the list myList. The procedure does not work as intended. Which of the following chan ges can be made so that the procedure will work as intended? - ANSWERS Moving the statement in line 5 so that it appears between lines 2 and 3 In the following code segment, score and penalty are initially positive integers. The code segment is intended to reduce the value of score by penalty. However, if doing so would cause score to be negative, score should be assigned the value 0. For example, if score is 20 and penalty is 5, the code segment should set score to 15.If score is 20 and penalty is 30, sc ore should be set to 0. The code segment does not work as intended. Line 1: IF(score - penalty < 0) Line 2: { Line 3: score ← score - penalty Line 4: } Line 5: ELSE Line 6: { Line 7: score ← 0 Line 8: } Which of the following changes can be made so that the code segment works as intended? - ANSWERS Interchanging lines 3 and 7 Three students in different locations are collaborating on the development of an application. Which of the following strategies i s LEAST likely to facilitate collaboration among the students? - ANSWERS 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? A student wrote the following code segment, which displays true if the list myList contains any duplicate values and displays false otherwise. The code segment compares pairs of list elements, setting containsDuplicates to true if any two elemen ts are found to be equal in value. Which of the following best describes the behavior of how pairs of elements are compared? - ANSWERS The code segment iterates through myList, comparing each element to all subsequent elements in the list. The following code segment is intended to set max equal to the maximum value among the integer variables x, y, and z. The code segment does not work as intended in all cases. Which of the following initial values for x, y, and z can be used to show that the code segment does not work as intended? - ANSWERS x = 3, y = 2, z = 1 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 th e application? - ANSWERS The cost of a food item currently available for order The following procedure is intended to return true if the list of numbers myList contains only positive numbers and is intended to return false otherwise. The procedure does n ot work as intended. PROCEDURE allPositive(myList) { index ← 1 len ← LENGTH(myList) REPEAT len TIMES { IF(myList[index] > 0) { RETURN(true) } index ← index + 1
$13.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
FRANKGEORGEM7
1.0
(2)

Get to know the seller

Seller avatar
FRANKGEORGEM7 WALDEN UNIVERSITY
View profile
Follow You need to be logged in order to follow users or courses
Sold
9
Member since
2 year
Number of followers
9
Documents
757
Last sold
1 year ago
HOMEWORK HELP AND TUTORING ,ALL KIND OF QUIZ AND EXAMS WITH GUARANTEE OF AN A+ PASS

Am an expert on major courses especially; psychology, Nursing and Human resource Management

1.0

2 reviews

5
0
4
0
3
0
2
0
1
2

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions