Mcq — Ap Computer Science Principles 2020 Practice Exam 1

A programmer writes a procedure CalculateAverage(numList) that returns the average of the numbers in a list. Which of the following inputs would likely cause an error if the procedure does not check for empty lists? A) A list with positive numbers. B) A list with negative numbers. C) An empty list. D) A list with decimal numbers.

Symmetric encryption uses a single shared key for both encryption and decryption. Public/Private key pairs are asymmetric encryption. ap computer science principles 2020 practice exam 1 mcq

x ← 10 y ← 20 z ← 30 x ← y y ← z z ← x B) A list with negative numbers

max ← item

Traffic data is primarily used to optimize flow and timing of lights. While privacy is a concern, the benefit cited is usually efficiency. Symmetric encryption uses a single shared key for

A router connects a local network (LAN) to the Internet (WAN). A switch connects devices within the LAN.

Reducing the runtime of a program generally means the time complexity (the number of steps relative to input size) has been reduced, making the algorithm more efficient.