Quiz Notes
- Citizen science: experiment/research completed with participation from general public
- Go back to question 4 (guessed)
- Useful factors in program development:
- Consulting potential users of the program to identify their concerns
- Writing and testing small code segments before adding them to the program
- Collaborating with other individuals when developing a large program
- Private data: data not made available to the general public
- High security protection = encryption (view safe computing lesson)
- Boolean: variable that is true or false
- Pay attention to the order of the code
- Alphanumeric character: contains both letters and numbers, sometimes symbols (&, *, etc.)
- Machine Language Instruction: lowest level of programming language that directly corresponds to the instructions executed by a computer’s hardware
- Metadata: the information that describes and explains data
- Go back to question 38 (guessed)
- Certificate authority: a trusted entity that issues Secure Sockets Layer (SSL) certificates
- Go back to question 41 (guessed)
- Phishing: scam of sending emails or other messages purporting to be from reputable companies in order to induce individuals to reveal personal information, such as passwords and credit card numbers
Corrections
Question 17: Which of the following can be represented by a sequence of bits?
i. An integer
ii. An alphanumeric character
iii. A machine language instruction
- Skill 3.C: Explain how abstraction manages complexity.
- My Answer: i only
- Correct Answer: i, ii, iii
- The answer I picked was incorrect because although i is correct, so are ii and iii. All digitl data, including alphanumeric characters and macchine language instruction can be represented with sequence of bits at the lowest level.
Question 26: A list of binary values (0 or 1) is used to represent a black-and-white image. Which of the following is LEAST likely to be stored as metadata associated with the image?
- Skill 5.B: Explain how knowledge can be generated from data.
- My Answer: Copyright information for the image
- Correct Answer: A duplicate copy of the data
- My answer was incorrect because Metadata is data about data whereas copyright information is just descriptive information about images.
Question 36: A group of planners are using a simulation to examine whether or not a park that they are designing is going to affect foot traffic in the area. The simulation uses a model that includes input variables for the park such as the number of entrances, sidewalks, and bike trails and the square footage of open space (grassy areas). The simulation can then be run multiple times using different values for the input variables to represent different park designs.
However, the simulation takes a very long time to run. The planners update the model by removing some variables they consider less important than others. Of the following, which is the most likely effect the updated model will have on the simulation?
- Skill 1.D: Evaluate solution options.
- My Answer: The updated model is unlikely to provide any benefit because removing details from a model will compromise the accuracy of the simulation.
- Correct Answer: The updated model is likely to decrease the runtime of the simulation because the time required for simulations generally depends on the complexity of the model used.
- My answer is incorrect because although the updated model may be less accurate, it could still provide some benefit by reducing runtime.
Question 41: Let an original file name be stored in the string variable original. Which of the following statements will correctly extract the description and store it in the string variable descr ?
i. descr <-- TrimLeft (TrimRight (original, 4), 11)
ii. descr <-- TrimLeft (TrimRight (original, 11), 4)
iii. descr <-- TrimRight (TrimLeft (original, 11), 4)
- Skill 3.B: Use abstraction to manage complexity in a program.
- My Answer: i only
- Correct Answer: i and iii
- My answer is incorrect because although i is correct, so is iii. iii is correct because it will call TrimLeft (remove date tag) first the pass result to TrimRight (remove file extension) to get the wanted result.
Question 47: The procedure BinarySearch (numList, target) correctly implements a binary search algorithm on the list of numbers numList. The procedure returns an index where target occurs in numList, or -1 if target does not occur in numList. Which of the following conditions must be met in order for the procedure to work as intended?
- Skill 1.A: Investigate the situation, context, or task.
- My Answer: The list numList must not contain any duplicate values.
- Correct Answer: The values in numList must be in sorted order.
- My answer is incorrect because binary searches can work on sorted lists even if there are duplicate values, but the list must be sorted.
Question 49: An office uses an application to assign work to its staff members. The application uses a binary sequence to represent each of 100 staff members. What is the minimum number of bits needed to assign a unique bit sequence to each staff member?
- Skill 2.B: Implement and apply an algorithm.
- My Answer: 8
- Correct Answer: 7
- My answer is incorrect because 8 bits would allow for up to 2^8=256 employees, so 7 is more accurate (2^7=128)
Question 50: Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer.
i. An algorithm that accesses each element in the list twice
ii. An algorithm that accesses each element in the list n times
iii. An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list
Which of the algorithms run in reasonable time?
- Skill 1.D: Evaluate solution options.
- My Answer: iii only
- Correct Answer: i, ii, and iii
- My answer is incorrect because although iii is correct, so are i and ii. All three algorithms can access the elements in a reasonable time.
Question 56: Which of the following best compares the execution times of the two versions of the program?
- Skill 1.D: Evaluate solution options.
- My Answer: Version I requires approximately 1 more minute to execute than version II.
- Correct Answer: Version II requires approximately 5 more minutes to execute than version I.
- My answer is incorrect because Version II calls the procedure twice, so it takes longer than Version I. Version I takes about 4 minutes to complete because the procedure takes 1 minute to execute per element. Version II calls the procedure twice for each element (4x2=8) plus the final display statement 8+1=9 which is 5 more minutes than Version I.
Question 58: For which of the following procedure calls does the procedure NOT return the intended value?
- Skill 4.C: Identify and correct errors in algorithms and programs, including error discovery through testing.
- My Answer: AnyPairs (“bat”, “cat”, “rat”)
- Correct Answer: AnyPairs (“bat”, “cat”, “bat”)
- My answer is incorrect because bat does not equal cat, so the ELSE statement is executed and y=z returns as false (intended value).
Question 67: For which of the following code segments will the call to NumOccurrences NOT return the intended value? Select two answers.
- Skill 4.C: Identify and correct errors in algorithms and programs, including error discovery through testing.
- My Answer: A and D
- Correct Answer: A and B
- D is incorrect because the procedure returns 0 (intended value) since spruce is not included in the list.