
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
11 questions
GCSE Computer Science Paper 2: Topic 2.1
Quiz
•
10th Grade
10 questions
Data Types Quiz
Quiz
•
12th Grade
10 questions
Pengenalan Adobe Premiere
Quiz
•
12th Grade
10 questions
Algorithm
Quiz
•
10th - 12th Grade
10 questions
PF Unit 10
Quiz
•
9th Grade - University
10 questions
If-Statements
Quiz
•
9th - 12th Grade
8 questions
Overview of IT
Quiz
•
6th Grade - University
10 questions
Augmented Reality
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade