
Random Class Practice
Authored by Jessica Guthrie
Computers
9th - 12th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following lines of code will generate a random number
between 0 and 60?
Assume rand is the Random number generator
rand.nextInt(60)
rand.nextInt(61)
rand.nextInt(0, 60)
rand.nextInt(59)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What range of numbers will be included in the following Random number generator?
rand.nextInt(20)
0 to 20
1 to 20
0 to 19
20 to 100
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What range of numbers will be included in the following code?
rand.nextInt(35) + 2
2 to 35
2 to 37
2 to 36
0 to 36
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line of code needs to go at the top so that the program can generate random numbers?
import Random Class
import java.util.Random
import java.Random
import JavaRandomClass
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the variable for the following Random number generator?
Random r = new Random();
Random
r
Random()
new
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Fill in the blank so that numbers between 0 and 500 are generated.
Random r = new Random();
int num = r.nextInt( ______ )
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
Python- Operators
Quiz
•
12th Grade
10 questions
คำสั่งสร้างเกม scrach
Quiz
•
10th - 12th Grade
8 questions
Safer Internet Day 2021 Quiz
Quiz
•
7th - 9th Grade
10 questions
AP CSP Global Impact
Quiz
•
9th - 12th Grade
10 questions
Lesson 01 Unit 1 Excel 2019/365 MOAC
Quiz
•
9th - 12th Grade
11 questions
Google Slides Quiz
Quiz
•
12th Grade
10 questions
App Development lesson 1
Quiz
•
8th - 9th Grade
10 questions
Grade-9 LIBREOFFICE IMPRESS-ICT
Quiz
•
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
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