Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DSC 4 3 0 : Python Programming Assignment 0 7 0 1 : War and Random Numbers Find on the D 2 L a text

DSC 430: Python Programming
Assignment 0701: War and Random Numbers
Find on the D2L a text version of War and Peace by Leo Tolstoy. You will use it create a pseudo random number generator. The PRNG should be an object:
prng ,=
WarAndPeacePseudoRandomNumberGenerator()
Alternatively, you should be able to pass a seed when you create the object:
prng ,=
WarAndPeacePseudoRandomNumberGenerator(12345)
Then, you should be able to generate pseudo random numbers [0,1) :
r= prng.random()
Record a three minute video in which you run the code. Then, present your code. Specifically, answer the following questions:
Explain how your pseudo random numbers are produced.
Explain how you check whether you have reached to the end of the file, and how you renew the file object and the seed.
Generate 10,000 pseudo random numbers. What is the min, max, and mean? Does that make sense?
Submission: Submit a single .py file containing all the code to the D2L. Do not zip or archive the file. Your code must include comments at the top including your name, date, video link, and the honor statement, "I have not given or received any unauthorized assistance on this assignment." Each function must include a docstring and be commented appropriately.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

Summarize some human resource management training initiatives.

Answered: 1 week ago

Question

Summarize the training and development process.

Answered: 1 week ago

Question

Explain the concept of careers and career paths.

Answered: 1 week ago