placeholder image to represent content

AP CSP: Checkpoint 2 (Graded - Allowed 2 Attempts)

Quiz by Praise

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
19 questions
Show answers
  • Q1

    Consider the following code segment, which uses the variables r, s, and t. 

    Question Image

    3 2

    1 2

    2 3

    1 1

    120s
  • Q2

    Which of the following is a true statement about program documentation?

    Program documentation is useful when programmers collaborate but not when a programmer works individually on a project.

    Program documentation is only needed for programs in development; it is not needed after a program is completed.

    Program documentation should not be changed after it is first written.

    Program documentation is useful during initial program development and also when modifications are made to existing programs.

    120s
  • Q3

    The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal of determining whether the simulation resulted in an equal number of heads and tails.

    Step 1 : Initialize the variables heads_counter and flip_counter to 0.

    Step 2 : A variable coin_flip is randomly assigned a value of either 0 or 1. If coin_flip has the value 0, the coin flip result is heads, so heads_counter is incremented by 1.

    Step 3 : Increment the value of flip_counter by 1.

    Step 4 : Repeat steps 2 and 3 until flip_counter equals 4.

    Following execution of the algorithm, which of the following expressions indicates that the simulation resulted in an equal number of heads and tails?

    Question Image

    heads_counter = 2

    flip_counter = 1

    flip_counter = 2

    coin_flip = 1

    120s
  • Q4

    An algorithm has been developed to compute the sum of all the elements in a list of integers. Which of the following programming structures must be added to the existing algorithm so that the new algorithm computes the sum of only the even integers in the list?

    Selection

    Iteration

    Sequencing

    Searching

    30s
  • Q5

    An algorithm has been designed to display each element in a list of names. Which programming structure is necessary to ensure each name in the list is displayed, one after the other?

    Searching

    Sequencing

    Iteration

    Selection

    120s
  • Q6

    A program requires steps to be executed in a specific order: first reading input, then processing the data, and finally displaying the result. Which programming structure is responsible for ensuring that these steps happen in the correct order?

    Selection

    Searching 

    Sequencing 

    Iteration

    120s
  • Q7

    Which of the following scenarios requires the use of iteration?

    Checking if a number is positive or negative

    Adding two numbers and displaying the result

    Exiting a program when a specific condition is met

    Printing all even numbers in a list

    120s
  • Q8

    An algorithm needs to execute the following steps in sequence: initialize a counter, set the counter to zero, then start adding values to the counter from a list. Which of the following terms best describes the need to follow these steps in a specific order?

    Recursion

    Sequencing 

    Selection

    Iteration

    120s
  • Q9

    In a program that reads a list of items and then sorts them alphabetically before displaying them, what role does sequencing play?

    Ensures only specific items are displayed

    Ensures each item is displayed once

    Ensures that items are read before sorting and displaying

    Determines which items need to be displayed

    30s
  • Q10

    Which of the following activities poses the greatest personal cybersecurity risk?

    Paying a bill using a secure electronic payment system

    Withdrawing money from a bank account using an automated teller machine (ATM)

    Making a purchase at an online store that uses public key encryption to transmit credit card information

    Reserving a hotel room by e-mailing a credit card number to a hotel

    30s
  • Q11

    A programmer is writing a program that is intended to be able to process large amounts of data. Which of the following considerations is LEAST likely to affect the ability of the program to process larger data sets?

    How many programming statements the program contains

    How much memory the program requires as it runs

    How long the program takes to run

    How much storage space the program requires as it runs

    120s
  • Q12

    Which of the following is LEAST likely to indicate a phishing attack?

    An e-mail from your bank asks you to call the number on your card to verify a transaction

    An e-mail from a merchant asks that you click on a link to reset your password

    An e-mail from a utility company asks you to enter your date of birth and social security number for verification purposes

    An e-mail indicates that you have won a large sum of money and asks you to enter your bank account number so that the money can be transferred to you

    60s
  • Q13

    Which of the following is considered an unethical use of computer resources?

    Searching online for an electronic version of a school textbook

    Purchasing a single-user copy of photo editing software and installing it on all the computers in a computer lab

    Purchasing a game from an app store and downloading it directly to a mobile device

    Downloading freeware or shareware onto your home computer

    60s
  • Q14

    Which of the following statements are true about using a high-level programming language instead of a lower-level language?

    I. Programs written in a high-level language are generally easier for people to read than programs written in a low-level language.

    II. A high-level language provides programmers with more abstractions than a low-level language.

    III. Programs written in a high-level language are generally easier to debug than programs written in a low-level language.

    I only

    I and III only

    II and III only

    I, II, and III only

    120s
  • Q15

    What is displayed as a result of executing the algorithm in the flowchart?

    Question Image

    5

    15

    1 2 3 4

    1 2 3 4 5

    120s

Teachers give this quiz to your class