Search Header Logo

AP Computer Sci Principles unit 1

Authored by Yi Yi

Computers

9th - 11th Grade

Used 1+ times

AP Computer Sci Principles unit 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

32 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A program that Thomas has written is complete. It has been tested thoroughly, and some outputs were not as expected. Thomas is now going through the code carefully attempting to establish the cause of these errors and change the code to remove them. What is this procedure called?

Devlopment

Error Check

Coding

Debugging

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Understanding of the life cycle of a program is an essential component to becoming an effective programmer. Which of the following is the best example of how the life cycle of a program should work?

Idea→algorithm→write code→execute code→maintain→debug

Idea→write code→algorithm→execute code→debug→maintain

Idea→algorithm→write code→execute code→debug→maintain

Idea→algorithm→write code→debug→execute code→maintain

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Jeremiah is part of a group planning a summer fair at which local businesses can run stalls and events. He wants to use his programming skills to develop an app for the fair which businesses will be able to use to communicate information about their activities at the fair with visitors. Which of the following would be the best first step for Jeremiah to take?

Find out from the businesses and potential visitors what information and format they think should be used for the app

Develop all of the major algorithms which will be required for the app by drawing flowchart representations

Write some sample code to understand how the app might work

Write thorough documentation explaining how the code for the app works

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following two implementations of the same algorithm, each written in a different language.

Language A: Calculate the average daily rainfall for the week (averageRainfall) by adding together the rainfall totals for each of the 7 days of the week (sun, mon, tue, wed, thu, fri, and sat) and dividing the sum by 7.

Language B: Take the total amount of rain from each day of the week (sunday, monday, tuesday, wednesday, thursday, friday and saturday) and then average them together to get the average daily rainfall for the week (averageRainfall).

Which of the following statements about these two implementations is true?

Neither of these languages is clear enough that a programmer could write a correct solution in a high-level programming language.

Language A is ambiguous because it is unclear what sun, mon, tue, wed, thu, fri, and sat refer to in context with the problem.

Language B is ambiguous because the process of “average” is not explained well

The algorithms in both languages are ambiguous because they do not specify the actual values of the seven daily rainfall totals.

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

The algorithm below simulates rolling a regular 6-sided die twice. Consider the goal of determining if the sum of the values of the two rolls is odd or even.

 

Step 1: Using a random number generator, get a value between 1 - 6 inclusively Step 2: Remember that number Step 3: Repeat steps 1 and 2 Step 4: Add the two remembered numbers together Step 5: Multiply that sum by 10 Step 6: Divide the result of that multiplication by 2

 

What conclusions can be made with regard to what we are trying to determine? Select two answers:

If the value found in step 6 is 10, 30 or 50 then the sum is odd

If the last digit of the value found in step 6 is 5, then the sum is odd

If the value found in step 6 is 10, 20, 30, 40, 50 or 60 then the sum is even

If the value found in step 6 is not 20, 40, 60, 80, 100 or 120 then the sum is odd

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following should be true of any algorithm?

I. The order in which the steps making up the algorithm are followed is logically determined II. Following the instructions in the algorithm will always result in the same outputs, regardless of any inputs III. The instructions in the algorithm contain all necessary information to be implemented

II and III only

I and III only

I only

I, II and III

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the MOST important reason computers use artificial languages over natural language?

The meaning of different characters and words in an artificial languages is too complicated

The syntax of natural languages is easy to translate by computers

The meaning of different characters and words in an artificial languages is explicit and unambiguous

The syntax of artificial languages is explicit and unambiguous

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?