100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

AP Computer Science Principe’s AP Exam -1 (Practice Questions) BETTER VERSION with correct Answers

Rating
-
Sold
-
Pages
20
Grade
A+
Uploaded on
30-07-2024
Written in
2023/2024

AP Computer Science Principe’s AP Exam -1 (Practice Questions) BETTER VERSION with correct Answers

Institution
AP Computer Science
Course
AP Computer Science










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
AP Computer Science
Course
AP Computer Science

Document information

Uploaded on
July 30, 2024
Number of pages
20
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

AP Computer Science Principe’s AP Exam #1 (Practice Questions) BETTER VERSION with correct Answers
Which of the following expressions represents the value stored in the variable x as a result of executing the program?
C: 2 3 3 3 3
A small team of wildlife researchers is working on a project that uses motion-activated field cameras to capture images of animals at study sites. The team is considering using
a "citizen science" approach to analyze the images. Which of the following best explains
why such an approach is considered useful for this project?
D: The image analysis is likely to take a longer time for the research team than for a distributed group of individuals.
An algorithm is intended to display the following output.
{red red blue red red blue red red blue}
Which of the following code segments can be used to display the intended output?
C:
In a certain computer program, two positive integers are added together, resulting in an overflow error. Which of the following best explains why the error occurs?
C: The program can only use a fixed number of bits to represent integers; the computed
sum is greater than the maximum representable value.
The diagram below shows a circuit composed of three logic gates. Each gate takes two inputs and produces a single output.
C: A = false, B = true, C = true, D = true The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the bottom left square of the grid and facing right.
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 best describes the correctness of the programs?
C: Both program I and program II correctly move the robot to the gray square.
Flight simulation software, which imitates the experience of flying, is often used to train airline pilots. Which of the following is LEAST likely to be an advantage of using flight simulation software for this purpose?
C: Flight simulation software provides a more realistic experience for pilots than actual training flights.
Which of the following actions are generally helpful 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
D: I, II, and III
An Internet user has a need to send private data to another user. Which of the following provides the most security when transmitting private data?
C: Sending the data using public-key encryption
A programmer is creating an algorithm to display the cost of a ticket based on the information in the table. The programmer uses the integer variable age for the age of the ticket recipient. The Boolean variable includesTour is true when the ticket is for a guided tour and is false when the ticket is for general admission.
Which of the following code segments correctly displays the cost of a ticket?
B: cost ← 6
IF (age > 12)
{
cost ← cost + 2
}
IF (includesTour)
{
cost ← cost + 2 }
DISPLAY (cost)
A color in a computing application is represented by an RGB triplet that describes the amount of red, green, and blue, respectively, used to create the desired color. A selection of colors and their corresponding RGB triplets are shown in the following table.
Each value is represented in decimal (base 10).
According to information in the table, what color is represented by the binary RGB triplet
(11111111, 11111111, 11110000)?
A: Ivory
A color in a computing application is represented by an RGB triplet that describes the amount of red, green, and blue, respectively, used to create the desired color. A selection of colors and their corresponding RGB triplets are shown in the following table.
Each value is represented in decimal (base 10).
What is the binary RGB triplet for the color indigo?
C: (01001011, 00000000, 10000010)
A library system contains information for each book that was borrowed. Each time a person borrows or returns a book from the library, the following information is recorded in a database.
-Name and the unique ID number of the person who was borrowing the book
-Author, title, and the unique ID number of the book that was borrowed
-Date that the book was borrowed
-Date that the book was due to be returned
-Date that the book was returned (or 0 if the book has not been returned yet)
Which of the following CANNOT be determined from the information collected by the system?
B: The total number of books that were never borrowed in a given year
The following algorithm is intended to take a positive integer as input and display its individual digits in order from right to left. For example, if the input is 512, the algorithm should produce the output 2 1 5. Step 3 of the algorithm is missing.
Step 1: Input a positive integer from the user and store it in the variable number.
Step 2: Divide number by 10 and record the integer quotient and the remainder. The integer quotient is the quotient with any part after the decimal point dropped. For example, when 127 is divided by 10, the quotient is 12.7, the integer quotient is 12 and the remainder is 7.
Step 3: (missing step)
Step 4: Repeat steps 2 and 3 until number is 0.
Which of the following can be used as step 3 so that the algorithm works as intended?
B: Step 3: Display the remainder of number divided by 10 and store the integer quotient in number.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
millyphilip West Virginia University
View profile
Follow You need to be logged in order to follow users or courses
Sold
2807
Member since
3 year
Number of followers
1960
Documents
40493
Last sold
13 hours ago
white orchid store

EXCELLENCY IN ACCADEMIC MATERIALS ie exams, study guides, testbanks ,case, case study etc

3.7

539 reviews

5
238
4
84
3
104
2
31
1
82

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions