
AP Computer Science Principles Procedures
Presentation
•
Computers
•
9th - 12th Grade
•
Medium
David Guy
Used 132+ times
FREE Resource
3 Slides • 9 Questions
1
AP Computer Science Principles Procedures
by David Guy
2
Procedures
3
Procedures
​
4
Multiple Choice
The above procedure check is called in a program after each time a True or False question is answered. If the user types in True True False True as their answer for four questions on a quiz, what is displayed?
Wrong Wrong Correct Wrong
True True False True
Correct Correct Wrong Correct
Correct Wrong Correct
5
Multiple Choice
Consider the following procedures. What is displayed as a result of the procedure call proc2("birthday", "to you") ?
birthday happy to you
birthday happy birthday
to you birthday happy
to you happy birthday
6
Multiple Choice
In the procedure Mystery below, the parameter number is a positive integer. Which of the following best describes the result of running the procedure Mystery?
The procedure returns true when the initial value of number is 2, and it otherwise returns false.
The procedure returns true when the initial value of number is greater than 2, and it otherwise returns false.
The procedure returns true when the initial value of number is even, and it otherwise returns false.
The procedure returns true when the initial value of number is odd, and it otherwise returns false.
7
Multiple Choice
Code for the procedure Mystery is shown below. Assume that the parameter p has been assigned a positive integer value (e.g. 1,2,3...) Which of the following shows a POSSIBLE result of calling the procedure?
8
Multiple Choice
The procedure returns nothing because it will not terminate.
The procedure returns the value of 2 * n.
The procedure returns the value of n * n.
The procedure returns the sum of the integers from 1 to n.
9
Multiple Choice
Determine what is printed by the following code.
8
-16
-12
16
10
Multiple Choice
A student wrote the procedure below, which is intended to ask whether a user wants to keep playing a game. The procedure does not work as intended. Which of the following best describes the result of running the procedure?
The procedure returns TRUE when the user inputs the value "y" and returns FALSE otherwise.
The procedure returns TRUE when the user inputs the value "n" and returns FALSE otherwise.
The procedure returns TRUE no matter what the input is.
The procedure returns FALSE no matter what the input is.
11
Multiple Choice
12
Multiple Choice
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing toward the top of the grid. Which of the following code segments will move the robot to the gray square along the path indicated by the arrows?
AP Computer Science Principles Procedures
by David Guy
Show answer
Auto Play
Slide 1 / 12
SLIDE
Similar Resources on Wayground
8 questions
Python Boolean Logic / If, Else statements
Presentation
•
9th - 12th Grade
6 questions
MAC 2 | Lesson 5-7 | Wrap it Up
Presentation
•
KG
9 questions
Domain 1 - Lesson 3: Configure Drive Encryption
Presentation
•
9th - 12th Grade
10 questions
Operators in Python
Presentation
•
9th - 12th Grade
9 questions
Y = MX + B Review
Presentation
•
9th - 12th Grade
10 questions
Domain 2 Lesson 3
Presentation
•
9th - 12th Grade
10 questions
Writing an equation from a graph
Presentation
•
9th - 12th Grade
10 questions
PR1 QUALITATIVE RESEARCH INTRODUCTION & BACKGROUND OF THE STUDY
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Oak Hills High School Policy and Success Quiz
Passage
•
9th Grade
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
15 questions
School Bus Safety Questions
Quiz
•
6th Grade
25 questions
AJHS Scavenger Hunt
Quiz
•
6th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
22 questions
would you rather
Quiz
•
3rd - 11th Grade
29 questions
Laboratory Safety Rules
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Oak Hills High School Policy and Success Quiz
Passage
•
9th Grade
22 questions
would you rather
Quiz
•
3rd - 11th Grade
55 questions
CHS Student Handbook 26-27
Quiz
•
9th Grade
21 questions
Lab Safety
Quiz
•
10th Grade
18 questions
Evidence of Evolution
Quiz
•
9th Grade
20 questions
1.1 (a) Classifying Polynomials
Quiz
•
9th Grade
73 questions
Reading Graphs
Quiz
•
9th - 12th Grade
20 questions
Characteristics of Life
Quiz
•
9th - 10th Grade