
AP CSP Math (3.3)
Authored by Herman Galioulline
Computers
9th - 12th Grade
Used 42+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
About
This quiz covers fundamental mathematical and logical operations within computer science programming, specifically focusing on algorithm design and variable manipulation. The content is appropriate for grades 10-12, particularly students enrolled in Advanced Placement Computer Science Principles. The core concepts students need include understanding absolute value functions, random number generation algorithms, variable swapping techniques, and step-by-step algorithmic thinking. Students must demonstrate their ability to trace through code sequences, evaluate the fairness and effectiveness of random selection methods, and apply mathematical operations within programming contexts. The problems require logical reasoning skills to determine which algorithmic approaches correctly achieve specified outcomes, as well as the ability to mentally execute code and predict results. Created by Herman Galioulline, a Computer Science teacher in Switzerland who teaches grades 9-12. This quiz serves as an excellent tool for formative assessment in AP Computer Science Principles courses, particularly when covering algorithmic thinking and mathematical operations in programming. Teachers can use this as a warm-up activity to activate prior knowledge about variable manipulation, assign it as homework to reinforce concepts covered in class, or implement it as a review session before assessments on algorithmic design. The quiz effectively supports instruction by requiring students to analyze different algorithmic approaches and select the most appropriate solutions, developing critical thinking skills essential for computer science success. This assessment aligns with Common Core Mathematical Practices MP1 (Make sense of problems and persevere in solving them) and MP3 (Construct viable arguments and critique the reasoning of others), as well as CSTA K-12 Computer Science Standards 3A-AP-11 (Create clearly named variables that represent different data types) and 3A-AP-13 (Create prototypes that use algorithms to solve computational problems).
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Step 1: Add num1 and num2 and store the result in the variable sum.
Step 2: Take the absolute value of sum and display the result.
Step 1: Subtract num1 from num2 and store the result in the variable diff.
Step 2: Take the absolute value of diff and display the result.
Step 1: Take the absolute value of num1 and store it in the variable absNum1.
Step 2: Take the absolute value of num2 and store it in the variable absNum2.
Step 3: Add absNum1 and absNum2 and display the result.
Step 1: Take the absolute value of num1 and store it in the variable absNum1.
Step 2: Take the absolute value of num2 and store it in the variable absNum2.
Step 3: Subtract absNum1 from absNum2 and display the result.
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A teacher has a goal of displaying the names of 2 students selected at random from a group of 30 students in a classroom. Any possible pair of students should be equally likely to be selected. Which of the following algorithms can be used to accomplish the teacher’s goal?
Step 1: Assign each student a unique integer from 1 to 30.
Step 2: Generate a random integer n from 1 to 15.
Step 3: Select the student who is currently assigned integer n and display the student’s name.
Step 4: Generate a new random integer n from 16 to 30.
Step 5: Select the student who is currently assigned integer n and display the student’s name.
Step 1: Assign each student a unique integer from 1 to 30.
Step 2: Generate a random integer n from 1 to 30.
Step 3: Select the student who is currently assigned integer n and display the student’s name.
Step 4: Generate a new random integer n from 1 to 30.
Step 5: Select the student who is currently assigned integer n and display the student’s name.
Step 1: Assign each student a unique integer from 1 to 30.
Step 2: Generate a random odd integer n from 1 to 29.
Step 3: Select the student who is currently assigned integer n and display the student’s name.
Step 4: Generate a new random even integer n from 2 to 30.
Step 5: Select the student who is currently assigned integer n and display the student’s name.
Step 1: Assign each student a unique integer from 1 to 30.
Step 2: Generate a random integer n from 1 to 30.
Step 3: Select the student who is currently assigned integer n and display the student’s name.
Step 4: The student who was selected in the previous step is assigned 0. All other students are reassigned a unique integer from 1 to 29.
Step 5: Generate a new random integer n from 1 to 29.
Step 6: Select the student who is currently assigned integer n and display the student’s name.
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following code segments can be used to interchange the values of the variables num1 and num2?
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
temp ← word1
word3 ← word1
word1 ← temp
temp ← word1
word1 ← word3
word3 ← temp
temp ← word1
word1 ← word2
word2 ← word3
word3 ← temp
temp ← word3
word3 ← word2
word2 ← word1
word1 ← temp
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
1
2
3
4
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
10 20 30 40
21 30 40 50
21 40 30 40
21 40 30 50
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
QBASIC Programming
Quiz
•
5th - 10th Grade
10 questions
Motherboard
Quiz
•
9th Grade
10 questions
tin 8 bài 4
Quiz
•
6th - 9th Grade
10 questions
ICT Activity 403 | Webpage Building
Quiz
•
11th Grade
10 questions
DBMS- CLASS8 CBSE
Quiz
•
7th - 10th Grade
10 questions
Spring MVC
Quiz
•
10th Grade
10 questions
1.3 The Internet
Quiz
•
10th Grade
10 questions
Python Code Quiz
Quiz
•
10th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade