Code 04 Random Numbers
Quiz
•
Computers
•
9th Grade
•
Hard
Tod Elford
FREE Resource
Enhance your content in a minute
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Diagnoses and Identification of Faulty Computer and Network
Quiz
•
9th Grade
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
9 questions
IT related jobs
Quiz
•
9th Grade
10 questions
S2 Subject Choice Quiz
Quiz
•
8th - 10th Grade
10 questions
Contact Center Sevices
Quiz
•
7th - 10th Grade
13 questions
Year 10 Data Transmission
Quiz
•
9th - 12th Grade
10 questions
Flow Charts (OCR GCSE)
Quiz
•
7th - 11th Grade
12 questions
Year 8 Spreadsheets L1 (Basics)
Quiz
•
9th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
