zuai-logo
  • Home

  • Mock Exam

  • Cliffs

  • Study Set

  • Talk to ZuAI

  • Request a Feature

zuai-logo
  1. AP Computer Science Principles
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion Bank

Algorithms & Programming Fundamentals

Question 1
1 mark
Computer Science PrinciplesAPExam Style
1 mark

What is the value of the variable 'x' after the following pseudocode is executed?

x โ† 10
Question 2
1 mark
Computer Science PrinciplesAPExam Style
1 mark

What is the value of y after the following code is executed?

x โ† 5
y โ† x + 3
x โ† 2
Question 3
1 mark
Computer Science PrinciplesAPExam Style
1 mark

Given the list myList โ† [5, 10, 15, 20], what value does myList[1] represent?

Question 4
1 mark
Computer Science PrinciplesAPExam Style
1 mark

What is the content of numbers after executing the following pseudocode?

numbers โ† [1, 2, 3]
INSERT(numbers, 2, 4)
Question 5
1 mark
Computer Science PrinciplesAPExam Style
1 mark

What is the result of the expression 15 MOD 4?

Question 6
1 mark
Computer Science PrinciplesAPExam Style
1 mark

What is the result of the expression "hello" + " " + "world"?

Question 7
1 mark
Computer Science PrinciplesAPExam Style
1 mark

If x โ† true and y โ† false, what is the result of NOT y?

Feedback stars icon

How are we doing?

Give us your feedback and let us know how we can improve

Question 8
1 mark
Computer Science PrinciplesAPExam Style
1 mark

What is printed after the following code is executed?

x โ† 7
IF x > 10
    DISPLAY("Large")
ELSE
    DISPLAY("Small")
Question 9
1 mark
Computer Science PrinciplesAPExam Style
1 mark

Consider the following code:

x โ† 5
y โ† 10
IF x > 2
    IF y < 15
        DISPLAY("Both conditions met")
    ELSE
        DISPLAY("Only outer condition met")
ELSE
    DISPLAY("No condition met")

What will be displayed?

Question 10
1 mark
Computer Science PrinciplesAPExam Style
1 mark

How many times will the following loop execute?

REPEAT 8 TIMES
    DISPLAY("Hello")