Create an object-oriented program that uses a custom list object to automatically generate and work with a series of random integers. Console Random Integer List How many random integers should the list contain?: 12 Random Integers ====: Integers: 17, 34, 34, 15, 71, 44, 97, 48, 19, 12, 83, 42 Count: 12 Total: 516 Average: 43.0 Continue? (y/n): y Random Integers Bye! === Integers: 52, 88, 10, 77, 56, 91, 17, 51, 22, 14, 48, 37 Count: 12 Total: 563 Average: 46.917 Continue? (y/n): n ● Specifications Create a Random IntList class that inherits the list class. This class should allow a programmer to create a list of random integers from 1 to 100 by writing a single line of code. For example, a programmer should be able to create a custom list that stores 12 random integers with this line of code: ● ==== ● int_list = RandomIntList (12) To do that, you can use the self keyword to access the list superclass like this: self.append (rand_int) The Random IntList class should contain methods or properties for getting the count, average, and total of the numbers in the list. In addition, it should contain a _str____ method for displaying a comma-separated list of integers as shown above. The program should use the Random IntList class to generate the list of random integers, display the list, and get the summary data (count, total, and average). The program should make sure the integer entered by the user is valid.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Create an object-oriented program that uses a custom list object to automatically generate and work with a
series of random integers.
Console
Random Integer List
How many random integers should the list contain?: 12
Random Integers
======== =======
Integers: 17, 34, 34, 15, 71, 44, 97, 48, 19, 12, 83, 42
Count: 12
Total: 516
Average: 43.0
Continue? (y/n): y
Random Integers
===============
Integers: 52, 88, 10, 77, 56, 91, 17, 51, 22, 14, 48, 37
Count: 12
Total: 563
Average: 46.917
Continue? (y/n): n
Bye!
Specifications
Create a Random IntList class that inherits the list class. This class should allow a programmer to
create a list of random integers from 1 100 by writing a single line of code. For example, a
programmer should be able to create a custom list that stores 12 random integers with this line of
code:
●
●
int_list = RandomIntList (12)
To do that, you can use the self keyword to access the list superclass like this:
self.append (rand_int)
The RandomIntList class should contain methods or properties for getting the count, average, and
total of the numbers in the list. In addition, it should contain a
str method for displaying a
comma-separated list of integers as shown above.
The program should use the RandomIntList class to generate the list of random integers, display
the list, and get the summary data (count, total, and average).
The program should make sure the integer entered by the user is valid.
Transcribed Image Text:Create an object-oriented program that uses a custom list object to automatically generate and work with a series of random integers. Console Random Integer List How many random integers should the list contain?: 12 Random Integers ======== ======= Integers: 17, 34, 34, 15, 71, 44, 97, 48, 19, 12, 83, 42 Count: 12 Total: 516 Average: 43.0 Continue? (y/n): y Random Integers =============== Integers: 52, 88, 10, 77, 56, 91, 17, 51, 22, 14, 48, 37 Count: 12 Total: 563 Average: 46.917 Continue? (y/n): n Bye! Specifications Create a Random IntList class that inherits the list class. This class should allow a programmer to create a list of random integers from 1 100 by writing a single line of code. For example, a programmer should be able to create a custom list that stores 12 random integers with this line of code: ● ● int_list = RandomIntList (12) To do that, you can use the self keyword to access the list superclass like this: self.append (rand_int) The RandomIntList class should contain methods or properties for getting the count, average, and total of the numbers in the list. In addition, it should contain a str method for displaying a comma-separated list of integers as shown above. The program should use the RandomIntList class to generate the list of random integers, display the list, and get the summary data (count, total, and average). The program should make sure the integer entered by the user is valid.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education