AP Computer Science Principles Big Idea 2

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards

Convert the following binary number to the equivalent decimal number.

(1101)

13

2
New cards

For each '1' digit in the binary number (bold), add the number at the top of the column to convert to decimal. What is the equivalent decimal number?

 

Binary to Base 10 Conversion Table

128

64

32

16

8

4

2

1

1

1

0

1

0

0

52

3
New cards

For each '1' digit in the binary number (bold), add the number at the top of the column to convert to decimal. What is the equivalent decimal number?

 

Binary to Base 10 Conversion Table

Powers of 2 row

128

64

32

16

8

4

2

1

Binary number

1

1

1

1

15

4
New cards

Convert 10111112 to base 10

95

5
New cards

Convert the following binary number to the equivalent decimal number.

(11100101)

229

6
New cards

What is the definition of a linear search?

A sequential search algorithm that starts at one end and goes through each element of a list until the desired element is found, otherwise the search continues until the end of the data set.

7
New cards

A student is transferring photos from her camera to her computer. The student notices that the saved photos on her computer are lower quality than the original raw photo on her camera.

Which of the following could be a possible explanation for the difference in image quality?

The saved image files were compressed with a lossy compression technique.

8
New cards

Which of the following is true about lossless data compression?

The compressed data can be restored back to its original state

9
New cards

Biologists often attach tracking collars to wild animals. For each animal, the following geolocation data is collected at frequent intervals.

  • The time

  • The date

  • The location of the animal

Which of the following questions about a particular animal could NOT be answered using only the data collected from the tracking collars?

Do the movement patterns of the animal vary according to the weather?

10
New cards

Which is a true statement about Linear Searches:

In linear search input data need not to be in sorted order

11
New cards

Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case.

 

Some programming languages use constants, which are variables that are initialized at the beginning of a program and never changed. Which of the following are good uses for a constant?

 

  1. To represent the mathematical value (pi) as 3.14

  2. To represent the current score in a game

  3. To represent a known value such as the number of days in a week

I and III only

12
New cards

Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case.

 

A social media site allows users to send messages to each other. A group of researchers gathered user data for the first 10 years of the site's existence. Some of the data are summarized in the table below, along with some of the company milestones.

 

Data Gathered from Researchers

Year

Milestone

Total Number of Registered Users (in millions)

Average Number of Active Daily Users (in millions)

Average Number of Daily Messages Sent Per User

Average Number of Characters Per Message

1

Web site launched

25.4

0.8

3.6

360

2

 

26.0

0.7

3.5

362

3

 

26.5

0.6

3.5

358

4

 

26.9

0.6

3.4

360

5

Mobile app released

27.4

0.9

3.3

269

6

 

28.0

0.9

3.4

242

7

 

28.6

1.1

3.5

195

8

 

29.1

1.2

3.5

176

9

 

29.6

1.1

3.6

104

10

 

30.2

1.1

3.6

96

 

Which of the following hypotheses is most consistent with the data in the table?

The mobile app release led to users tending to write shorter messages.

13
New cards

The player controls in a particular video game are represented by numbers. The controls and their corresponding binary values are shown in the following table.

Control Key and Binary Value Table

Control

Binary Value

01000

01001

01011

01111

Jump

11000

Run

11001

Pause

11011

Reset

11111

 

 The numeric values for the controls can also be represented in decimal (base 10).

 

 What is the decimal value for the jump control?

24

14
New cards

A database of information about shows at a concert venue contains the following information.

 

  • Name of artist performing at the show

  • Date of show

  • Total dollar amount of all tickets sold

 

Which of the following additional pieces of information would be most useful in determining the artist with the greatest attendance during a particular month?

Average ticket price

15
New cards

A file storage application allows users to save their files on cloud servers. A group of researchers gathered user data for the first eight years of the application's existence. Some of the data are summarized in the following graphs. The line graph on the left shows the number of registered users each year. The line graph on the right shows the total amount of data stored by all users each year. The circle graph shows the distribution of file sizes currently stored by all users.

 

 

Line graphs for user data gathered by the researchers.

 

FILE SIZE DISTRIBUTION

 

Circle graph for user data gathered by the researchers.

(note: 1MB=1,000 KB)

 

 

Which of the following best describes the growth in the number of registered users for the first eight years of the application’s existence?

The number of registered users about doubled each year for years 1 to 5 and then increased at about a constant rate after that.

16
New cards

Historically, it has been observed that computer processing speeds tend to double every two years. Which of the following best describes how technology companies can use this observation for planning purposes?

Technology companies can set research and development goals based on anticipated processing speeds.

17
New cards

A person wants to transmit an audio file from a device to a second device. Which of the following scenarios best demonstrates the use of lossless compression of the original file?

A device compresses the audio file before transmitting it to a second device. The second device restores the compressed file to its original version before playing it.

18
New cards

A large spreadsheet contains the following information about the books at a bookstore. A sample portion of the spreadsheet is shown below.

 

Bookstore Database

 

A

Book Title

B

Author

C

Genre

D

Number of Copies in Stock

E

Cost (in dollars)

1

Little Women

Louisa May Alcott

Fiction

3

13.95

2

The Secret Adversary

Agatha Christie

Mystery

2

12.95

3

A Study in Scarlet

Arthur Conan Doyle

Mystery

0

8.99

4

The Hound of Baskervilles

Arthur Conan Doyle

Mystery

1

8.95

5

Les Misérables

Victor Hugo

Fiction

1

12.99

6

Frankenstein

Mary Shelley

Horror

2

11.95

An employee wants to count the number of books that meet all of the following criteria.

 

  • Is a mystery book

  • Costs less than $10.00

  • Has at least one copy in stock

 

For a given row in the spreadsheet, suppose genrecontains the genre as a string, num contains the number of copies in stock as a number, and cost contains the cost as a number. Which of the following expressions will evaluate to true if the book should be counted and evaluates to false otherwise?

 

(genre = "mystery") AND (( 1 num) AND (cost 10.00))

19
New cards

Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case.

 

Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string more than once and replaces each instance of that pair with a corresponding character that does not appear in the string. The algorithm saves a list containing the mapping of character pairs to their corresponding replacement characters.

 

For example, the string "THIS_IS_THE_BEST_WISH" can be encoded as "%#_#_&E_BEST_W#H" by replacing all instances of " TH" with " % " and replacing all instances of "IS" with "#".

 

Which of the following statements about byte pair encoding is true?

Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.

20
New cards

Which of the following is an advantage of a lossless compression algorithm over a lossy compression algorithm?

A lossless compression algorithm can guarantee reconstruction of original data, while a lossy compression algorithm cannot.

21
New cards

A computer program uses 3 bits to represent integers. When the program adds the decimal (base 10) numbers 5 and 3 , the result is 0 . Which of the following is the best explanation for the result?

An overflow error occurred.

22
New cards

A large spreadsheet contains information about the schedule for a college radio station. A sample portion of the spreadsheet is shown below.

 

College Radio Station Spreadsheet

 

A

Show Name

B

Genre

C

Day

D

Start Time

E

End Time

1

Dot Dot Dash

rock

Sunday

11:00 A.M.

1:00 P.M.

2

New Afternoon Show

talk

Sunday

1:00 P.M.

3:00 P.M.

3

Thursday Beats

hip-hop

Thursday

7:00 P.M.

9:00 P.M.

4

Gossip Time

talk

Friday

4:00 P.M.

6:00 P.M.

5

Campus Chat

talk

Saturday

6:00 P.M.

8:00 P.M.

6

Jazz Brunch

jazz

Saturday

12:00 P.M.

3:00 P.M.

 

A student wants to count the number of shows that meet both of the following criteria.

 

  • Is a talk show

  • Is on Saturday or Sunday

 

For a given row in the spreadsheet, suppose genre contains the genre as a string and day contains the day as a string. Which of the following expressions will evaluate to true if the show should be counted and evaluates to false otherwise?

(genre = "talk") AND ( (day = "Saturday") OR (day = "Sunday"))

23
New cards

Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case.

A media librarian at a movie studio is planning to save digital video files for archival purposes. The movie studio would like to be able to access full-quality videos if they are needed for future projects. Which of the following actions is LEAST likely to support the studio's goal?

Using lossy compression software to reduce the size requirements of the data being stored

24
New cards

The owner of a clothing store records the following information for each transaction made at the store during a 7-day period.

 

  • The date of the transaction

  • The method of payment used in the transaction

  • The number of items purchased in the transaction

  • The total amount of the transaction, in dollars

 

Customers can pay for purchases using cash, check, a debit card, or a credit card.

 

Using only the data collected during the 7-day period, which of the following statements is true?

The total number of items purchased on a given date can be determined by searching the data for all transactions that occurred on the given date and then adding the number of items purchased for each matching transaction.