AP Computer Science Principles FRQ Practice
1. Data Representation
Question:
Consider the following binary number: 1101101
(a) Convert this binary number to its decimal (base-10) equivalent.
(b) Convert this binary number to its hexadecimal (base-16) equivalent.
(c) If you were to represent this binary number as a character in ASCII, what character would it represent?
Response Guidelines:
- Part (a):
Convert the binary number to decimal by calculating the sum of powers of 2 based on the position of each bit. - Part (b):
Convert the binary number to hexadecimal by grouping the binary digits in sets of four, starting from the right, and converting each set to a hexadecimal value. - Part (c):
Convert the binary number to its corresponding ASCII character using the ASCII table.
2. Algorithm Design
Question:
Write an algorithm to find the largest number in a list of integers.
def findLargestNumber(nums):
# Implement your algorithm here
(a) Describe the algorithm and its steps.
(b) What is the time complexity of the algorithm?
Response Guidelines:
- Part (a):
The algorithm should iterate through the list of integers, keeping track of the largest number found so far. - Part (b):
The time complexity is based on how many steps the algorithm takes relative to the number of elements in the list. For this problem, it's typically O(n), where n is the number of elements in the list.
3. Internet and Networking
Question:
(a) Explain the difference between the Internet and the World Wide Web (WWW).
(b) Describe how data is transmitted over the internet using the TCP/IP protocol.
Response Guidelines:
- Part (a):
The Internet refers to the global network of computers that are connected to each other. The World Wide Web (WWW) is a system of interlinked hypertext documents that can be accessed via the Internet. - Part (b):
The TCP/IP protocol is used for sending data over the Internet. TCP (Transmission Control Protocol) ensures that data is delivered reliably by breaking it into packets, sending them, and ensuring they are reassembled in the correct order. IP (Internet Protocol) routes the packets to their destination.
Grading Rubric for AP Computer Science Principles FRQs
1. Data Representation
- Part (a):
- 0-1 points: Incorrect conversion to decimal.
- 2 points: Correctly converts the binary number to decimal.
- Part (b):
- 0-1 points: Incorrect conversion to hexadecimal.
- 2 points: Correctly converts the binary number to hexadecimal.
- Part (c):
- 0-1 points: Incorrect ASCII character.
- 2 points: Correctly identifies the ASCII character.
2. Algorithm Design
- Part (a):
- 0-1 points: Incomplete or incorrect algorithm.
- 2 points: Correct description of the algorithm steps.
- Part (b):
- 0-1 points: Incorrect time complexity or explanation.
- 2 points: Correctly explains the time complexity of the algorithm as O(n).
3. Internet and Networking
- Part (a):
- Part (b):
- 0-1 points: Incorrect explanation of the TCP/IP protocol.
- 2 points: Correctly explains how data is transmitted using the TCP/IP protocol.
Sample Grading Breakdown (for one FRQ)
- Data Representation: 6 points
- Algorithm Design: 4 points
- Internet and Networking: 4 points
- Total: 14 points (for all three FRQs combined)