Test with inputs that sit on the edges: the first and last item, an empty list, equal values. A logic error hides in the cases a program was not written for.
Two members of a team disagree about whether their recipe app should require users to create an account. Which approach shows effective conflict resolution?
Question 2
Which of the following statements about collaboration in developing computing innovations are accurate? Select two answers.
Question 3
A developer describes a program in two ways. Description 1: "The app helps students plan study time." Description 2: "The app reads each due date, sorts the assignments by date and shows a daily reminder for each." Which statement about the descriptions is accurate?
Question 4
A movie theater's kiosk runs the code segment, and the user enters 65. What is displayed?age ← INPUT()
IF (age < 12)
{
price ← 5
}
ELSE
{
IF (age ≥ 65)
{
price ← 6
}
ELSE
{
price ← 9
}
}
DISPLAY(price)
Question 5
A smart thermostat program controls a home's heater. Which of the following are inputs to the program? Select two answers.
Question 6
Which of the following activities belongs to the design phase of developing a program?
Question 7
A school asks a team for an app that students use to book time in the computer lab. Which of the following is a program requirement?
Question 8
A developer is writing documentation for the procedure. Which of the following describes what the procedure does?PROCEDURE process(aList, target)
{
count ← 0
FOR EACH item IN aList
{
IF (item = target)
{
count ← count + 1
}
}
RETURN(count)
}
Question 9
What is the result of running the code segment?n ← 10
REPEAT UNTIL (n = 0)
{
n ← n - 3
}
DISPLAY(n)
Question 10
The code segment is intended to display 1 2 3 4 5, but it displays 1 2 3 4.count ← 1
REPEAT UNTIL (count = 5)
{
DISPLAY(count)
count ← count + 1
}Which replacement for the REPEAT UNTIL line makes it work as intended?
Question 11
A step counter stores the day's step count in 16 bits as a whole number from 0 to 65,535. A hiker takes 70,000 steps in one day. Which of the following errors can result?
Question 12
Which of the following code segments contain a syntax error? Select two answers.
Question 13
A developer hand traces the code segment, keeping track of x and y after each pass through the loop. What value is displayed?x ← 2
y ← 5
REPEAT 3 TIMES
{
x ← x + y
y ← y - 1
}
DISPLAY(x)
Question 14
The code segment is intended to display the product of the numbers in nums. It displays 0 for every list. Which change fixes the error?product ← 0
FOR EACH n IN nums
{
product ← product * n
}
DISPLAY(product)
Question 15
A program should display "pass" for whole-number scores from 60 to 100 and "fail" for scores from 0 to 59. Which set of test inputs best checks the program at the extremes of its input data?