
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
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 12th Grade
11 questions
Youtube
Quiz
•
4th Grade - University
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
15 questions
LA1.C1: Introduction to Small Basic
Quiz
•
9th Grade
14 questions
Pre-test: On Online searching by Innovative Teaching Ideas)
Quiz
•
6th - 12th Grade
13 questions
Melody Tone
Quiz
•
9th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
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
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade