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

Algorithms & Programming Fundamentals

Question 1
Computer Science PrinciplesAPExam Style
1 mark

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

pseudocode
x ← 5
y ← x + 3
x ← 2
Question 2
Computer Science PrinciplesAPExam Style
1 mark

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

Question 3
Computer Science PrinciplesAPExam Style
1 mark

If x ← true and y ← false, what is the result of NOT y?

Question 4
Computer Science PrinciplesAPExam Style
1 mark

Consider the following code:

pseudocode
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 5
Computer Science PrinciplesAPExam Style
1 mark

In the context of procedures, what are the values passed to a procedure when it is called?

Question 6
Computer Science PrinciplesAPExam Style
1 mark

What is the primary benefit of using procedural abstraction?

Question 7
Computer Science PrinciplesAPExam Style
1 mark

What is a characteristic of an algorithm that runs in a reasonable amount of time?

Feedback stars icon

How are we doing?

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

Question 8
Computer Science PrinciplesAPExam Style
1 mark

What is a characteristic of an undecidable problem?

Question 9
Computer Science PrinciplesAPExam Style
1 mark

How many times will the following loop execute?

pseudocode
REPEAT 8 TIMES
    DISPLAY("Hello")
Question 10
Computer Science PrinciplesAPExam Style
1 mark

Which of the following is true about different algorithms that solve the same problem?