1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alinara [238K]
3 years ago
7

uestion 2. Using a simulation with 10,000 trials, assign num_different to the number of times, in 10,000 trials, that two words

picked uniformly at random (with replacement) from Pride and Prejudice have different lengths. Hint 1: What function did we use in section 1 to sample at random with replacement from an array? Hint 2: Remember that != checks for non-equality between two items.
History
1 answer:
Olegator [25]3 years ago
7 0

Answer:

This simulation will be done using Python programming language

# Program is written in Python

# Comments are used for explanatory purpose

# Program starts here

stringtocheck = open('PrideAndPrejudice.txt', encoding='utf-8').

read()

#Split words

splitwords = np.array(string.split())

In []:

# Initialise trial simulation to 10000 in test variable

test = 10000

# Initialise diff to 0

diff = 0

# iterate for possible words in PrideAndPrejudice

for i in np.arange(test):

# search for 2 words

words = np.random.choice(splitwords, 2)

#implement the condition in hint above

iflen(words.item(0)) != len(words.item(1)) != len(words.item(2)) != len(words.item(0)):

#calcuate result

diff = diff + 1

num_different = diff/test

You might be interested in
Which reason did fifteenth-century Europeans have for finding a sea passage to East Asia?
aleksandrvk [35]

the answer is C they were looking for a safer route to East Asia through the Americas

8 0
3 years ago
Read 2 more answers
Who is Damon Nivens and what did he do
sattari [20]

Are you looking for information on a football player?

The only Damon Nivens I can find information on is an offensive linebacker and assistant football coach. He is currently working at Southern University and University of Arkansas at Pine Bluff and previously worked for the New York Football Giants, Southern University and A&M college - Baton Rouge.

EDIT: He also works at Livonia High School, confirmed by OP.

3 0
3 years ago
Read 2 more answers
Which new deal program was chiefly designed to correct abuses in the stock market?
Oksanka [162]
The New Deal, which was created by Franklin D. Roosevelt
8 0
3 years ago
Read 2 more answers
Why is specialization of labor so important to the development of civilization?
UNO [17]

Answer:

Specialization of labor is the division of special tasks and roles. They are divided, so everyone has a different job to do. In most Ancient American civilizations, specialization of labor was important to help keep the civilization running. Division of labor were in all civilizations.

5 0
3 years ago
evaluate how the french, including marshal phillepe petain, view the Vichy regime that he led from 1940 to 1944
Helga [31]

Answer:

The French, including Marshal Philippe Petain, who led the Vichy Regime between 1940 and 1944, viewed the Vichy Regime as a German imperial authoritative government.

Explanation:

The Vichy Regime was hated by all french people.  In addition to being an authoritarian regime, it censored the press, prohibited divorce, and made abortion a capital offense in France.  As an unpopular imperial regime, the Vichy government also arrested and deported 13,000 Jews to Gestapo camps, including 4,000 children.  The french so much hated the German government that was imposed on their nation, including the German troops that flooded the french streets, that at the end of the war in 1945, the collaborators of the regime were punished with death or imprisonment.

7 0
3 years ago
Other questions:
  • You are starting a new homebuilding business and are responsible for choosing a location to build your first subdivision. You wa
    7·1 answer
  • What are the names of two television shows that challenged societal norms during the 1970s?
    13·2 answers
  • How did Carter plan to achieve his goals
    12·2 answers
  • Could someone please give me a quote from the book "Wonder" that describes the setting?
    14·1 answer
  • "Rule by the people" is another way to describe which concept?
    11·1 answer
  • 5. What did A. Philip Randolph do?
    12·2 answers
  • What was home life and culture like in early China
    15·1 answer
  • Which of the following is NOT true of television journalism?
    9·1 answer
  • PLSSSSSSS HELPPPPPPP I WILL GIVE BRAINLIESTTTTTTTTTT!!!!!!!!!!!!!!!!!!!!!PLSSSSSSS HELPPPPPPP I WILL GIVE BRAINLIESTTTTTTTTTT!!!
    6·2 answers
  • People left their homelands and came to Minnesota for many reasons. Fill in as many as you can.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!