Questions
(72ab92) AP CS Principles 1.2 AP-Style MC Practice
Multiple choice
The algorithm below simulates rolling a regular 6-sided die twice. Consider the goal of determining if the sum of the values of the two rolls is odd or even. Step 1: Using a random number generator, get a value between 1 - 6 inclusively Step 2: Remember that number Step 3: Repeat steps 1 and 2 Step 4: Add the two remembered numbers together Step 5: Multiply that sum by 10 Step 6: Divide the result of that multiplication by 2 What conclusions can be made with regard to what we are trying to determine? Select two answers:
Options
A.If the value found in step 6 is not 20, 40, 60, 80, 100 or 120 then the sum is odd
B.If the value found in step 6 is 10, 20, 30, 40, 50 or 60 then the sum is even
C.If the last digit of the value found in step 6 is 5, then the sum is odd
D.If the value found in step 6 is 10, 30 or 50 then the sum is odd
View Explanation
Verified Answer
Please login to view
Step-by-Step Analysis
We start by restating the question and the available answer choices to ensure clarity before digging into each option.
Question: The described algorithm simulates rolling a six-sided die twice and asks what conclusions can be drawn about whether the sum is odd or even. The two remembered rolls are summed, then multiplied by 10, and finally divided by 2. Which two statements about the parity of the sum can be concluded?
Options to evaluate:
A) If the value found in step 6 is not 20, 40, 60, 80, 100 or 120 then the sum is odd
B) If the value found in step 6 is 10, 20, 30, 40, 50 or 60 then the sum is even
C) If the last digit of the value found in step 6 is 5, then t......Login to view full explanationLog in for full answers
We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!
Similar Questions
In a consumer society, many adults channel creativity into buying things
Economic stress and unpredictable times have resulted in a booming industry for self-help products
People born without creativity never can develop it
A product has a selling price of $20, a contribution margin ratio of 40% and fixed cost of $120,000. To make a profit of $30,000. The number of units that must be sold is: Type the number without $ and a comma. Eg: 20000
More Practical Tools for Students Powered by AI Study Helper
Making Your Study Simpler
Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!