
56. Programming 2 : Random Number Generation
Passage
•
Computers
•
9th Grade
•
Practice Problem
•
Hard
Andy Workman
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first step in generating random numbers in a Python program?
Writing a loop
Importing the random library
Using an if statement
Declaring variables
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What range of numbers does the example Python code generate for simulating a dice roll?
0 to 5
1 to 6
2 to 7
1 to 5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In pseudocode for exams, how is a random number between 2 and 5 generated?
random_int(2, 5)
generateRandom(2, 5)
RANDOM_NUM(2, 5)
RANDOM_INT(2, 5)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the nature of computers that makes generating true random numbers challenging?
Static
Dynamic
Deterministic
Non-deterministic
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of random numbers is usually sufficient for most applications?
True random numbers
Pseudo-random numbers
Sequential numbers
Fixed numbers
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a seed value used for in pseudo-random number generation?
To create a fixed pattern
To decrease the randomness
To alter the list of random numbers generated
To generate the same sequence of numbers
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the UNIX epoch time?
The time since the computer was turned on
The current time in milliseconds
The time it takes to execute a program
The number of seconds since January 1, 1970
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
14 questions
LA5.C5: Branching and Subroutines
Quiz
•
9th Grade - University
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
13 questions
Guess the Retro Computer 1
Quiz
•
KG - Professional Dev...
10 questions
Programming Constructs
Quiz
•
5th - 11th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
11 questions
HEALTH AND SAFETY 9
Quiz
•
7th - 9th Grade
10 questions
Basic Parts of Speech EPS
Quiz
•
9th - 10th Grade
15 questions
Quiz 1
Quiz
•
1st - 12th 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
