
Code 04 Random Numbers
Authored by Tod Elford
Computers
9th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which block is used to generate random numbers in your programs?
randomNumber()
generateRandom()
randomValue()
numberRandom()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the command randomNumber(1, 6) do?
Generates a random number between 1 and 6
Generates a random number between 0 and 5
Generates a random number between 1 and 5
Generates a random number between 0 and 6
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can random numbers be used in drawing commands?
As parameters to create random drawings
Only to set the color of shapes
Only to set the size of shapes
Only to set the border of shapes
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you use randomNumber() multiple times in your program, what happens?
It generates new random numbers every time
It generates the same number every time
It generates numbers in a fixed sequence
It generates only one random number
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the use of randomNumber() in the command ellipse(randomNumber(0,400), 200);?
The x-coordinate of the ellipse is randomly chosen between 0 and 400
The y-coordinate of the ellipse is randomly chosen between 0 and 400
The size of the ellipse is randomly chosen between 0 and 400
The color of the ellipse is randomly chosen between 0 and 400
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why might each run of the command ellipse(randomNumber(0,400), randomNumber(0,400)); produce different results?
Because both coordinates are randomly generated each time
Because the color changes each time
Because the program uses a fixed sequence
Because the ellipse size is fixed
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of setting minimum and maximum values in randomNumber()?
To control the range of possible random numbers generated
To set the color of the random number
To fix the output to a single value
To repeat the same number every time
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
App Development lesson 1
Quiz
•
8th - 9th Grade
10 questions
Microsoft Teams
Quiz
•
KG - 12th Grade
15 questions
Google Tips and Tricks
Quiz
•
7th - 9th Grade
10 questions
Cyber Security
Quiz
•
1st - 10th Grade
15 questions
Unbound Report Quiz
Quiz
•
9th - 12th Grade
10 questions
Emerging technologies
Quiz
•
6th Grade - University
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
12 questions
Keyboard Parts
Quiz
•
7th - 9th 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade