
56. Programming 2 : Random Number Generation

Passage
•
Computers
•
9th Grade
•
Hard
Andy Workman
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Khan Academy Cryptography

Quiz
•
9th - 12th Grade
11 questions
Codebots and Python Coding

Quiz
•
7th - 9th Grade
6 questions
Chapter 13 - Data Structures

Quiz
•
9th Grade
16 questions
For and While Loops in Python

Quiz
•
9th - 12th Grade
12 questions
Python Demo Quiz Set1

Quiz
•
9th - 12th Grade
12 questions
SECURITY BASICS AND IT PROFESSIONAL (SECURITY POLICIES)

Quiz
•
9th - 12th Grade
16 questions
Linux komendy polecenia podstawy

Quiz
•
8th - 12th Grade
13 questions
Computer Internal and External

Quiz
•
6th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade