computer science

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which of the following explains a benefit of using open standards and protocols for Internet communication?

(A) Open standards and protocols allow different manufacturers and developers to build hardware and software that can communicate with hardware and software on the rest of the network.

An online retailer uses an algorithm to sort a list of n items by price. The table below shows the approximate number of steps the algorithm takes to sort lists of different sizes. Based on the values in the table, which of the following best characterizes the algorithm for very large values of n ?

(A) The algorithm runs in reasonable time.

A flowchart is a way to visually represent an algorithm. The flowchart below is used by an apartment rental Web site to set the variable include to true for apartments that meet certain criteria. Which of the following statements is equivalent to the algorithm in the flowchart?

(A) include ← (floor > 10) OR (bedrooms = 3)

A computer program uses 4 bits to represent nonnegative integers. Which of the following statements describe a possible result when the program uses this number representation? I. The operation 4+8 will result in an overflow error. II. The operation 7 + 10 will result in an overflow error. III. The operation 12 + 3 will result in an overflow error.

(B) II only

A computer program performs the operation 2÷3 and represents the result as the value 0.6666667. Which of the following best explains this result?

(B) The precision of the result is limited due to the constraints of using a floating-point representation.

A programmer is writing a procedure to calculate a student's final grade in the course using the score replacement policy described. The student's exam scores are stored in the variables midtermExam and finalExam. The procedure Max (a, b) returns the larger of a and b. Which of the following could be used in the procedure to calculate a student's total points earned in the course and store the result in the variable adjustedTotal?

(B) adjustedTotal ← Max (midtermExam, finalExam) + finalExam

Color is often represented by a 6-digit hexadecimal number that describes how the colors red, green, and blue are mixed to create the desired color. From left to right, the first two digits represent the amount of red, the second two digits represent the amount of green, and the last two digits represent the amount of blue. Which of the following hexadecimal numbers represents the color with the greatest amount of blue in it?

(C) A100B0

The two code segments below are each intended to display the average of the numbers in the list numList. Assume that numList contains more than one value. Which of the following best describes the two code segments?

(C) Both code segments display the correct average, but code segment I requires more arithmetic operations than code segment II.

The following programs are each intended to move the robot to the gray square. Program II uses the procedure GoalReached, which returns true if the robot is in the gray square and returns false otherwise. Which of the following statements is true?

(C) Both program I and program II correctly move the robot to the gray square.

A NAND gate is a type of logic gate that produces an output of false only when both of its two inputs are true. Otherwise, the gate produces an output of true. Which of the following Boolean expressions correctly models a NAND gate with inputs P and Q ?

(C) NOT (P AND Q)

A snack bar has a frequent customer program in which every 10th purchase is free. Customers are enrolled in the program when they make their first purchase. A programmer is writing a program to implement a frequent customer program. In one code segment, the cost is set to 0 for every 10th purchase by a given customer. The programmer will use the procedure GetCount (customerID), which returns the total number of purchases a customer has made since enrolling in the frequent customer program, including his or her first purchase. Which of the following code segments will set cost to 0 for every 10th purchase a customer makes after enrolling in the frequent customer program?

(C)count ← GetCount (customerID) IF (count MOD 10 = 0) { cost ← 0 }

Internet protocol version 4 (IPv4) represents each IP address as a 32-bit binary number. Internet protocol version 6 (IPv6) represents each IP address as a 128-bit binary number. Which of the following best describes the result of using 128-bit addresses instead of 32-bit addresses?

(D) 2^96 times as many addresses are available.

The teacher has data representing the scores of thousands of students. For each student, the data contain the student name, the midterm exam score, the final exam score, and the result of the total points calculation. Which of the following could be determined from the data? I. The average total points earned per student II. The average increase in total points per student as a result of the score replacement policy III. The proportion of students who improved their total points as a result of the score replacement policy

(D) I, II, and III

The latency of a network connection is most appropriately measured with which of the following units?

(D) Milliseconds

38. A researcher wrote a program to simulate the number of mice in an environment that contains predators. The program uses the following procedures. Based on the code, which of the following assumptions is made in the simulation?

(D) The number of predators does not change from day to day.

A musician is creating a song using audio samples. Which of the following actions will minimize the risk of a copyright violation when creating sample-based music?

(D) Using samples published with a no-rights-reserved Creative Commons license

The data from the survey are represented in the graph below. Each × represents a survey participant who said he or she was interested in the application, and each O represents a participant who said he or she was not interested.Which of the following hypotheses is most consistent with the data in the graph?

Participants who read more were generally more likely to say they are interested in the application.


Ensembles d'études connexes

M50: Depressive Disorders, Bipolar Disorder, Suicide, and Self-Injury

View Set

nurs 345 chapter 32 Skin integrity and wound care

View Set

Classification of blood pressure for adults

View Set

ARCHER - READINESS ASSESSMENT #1

View Set

4 Indications that a Chemical Reaction has Occurred

View Set

Final Exam Lifespan Developmental Psych

View Set