Question: # Iterators.py # # This program will create a collection of random numbers between 5 and 2 5 , # and then iterate through the
# Iterators.py
#
# This program will create a collection of random numbers between and
# and then iterate through the collection to print the items.
# Imports the necessary modules
import random
# Sets the size of the collection
SIZE
# Initializes an empty collection
collection
# Populates the collection with random numbers between and
for i in rangeSIZE:
collection.appendrandomrandint
# Iterates through the collection and prints the items
for item in collection:
printitem
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
