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
Washington's farewell address argued for as little connection to europe as possible. advocated an interventionist foreign policy
Naddika [18.5K]
Washington's farewell address called for "no entangling alliances". In other words, stay out of foreign affairs. Washington saw his own cabinet torn apart by differing views of certain European nations. He also warned against political parties. Again his own cabinet was ripped apart due to strong political feelings and refusal to compromise. He saw political parties as the first step in dividing a nation that had just begun. 
5 0
3 years ago
9.How did immigration change during the period between the Civil War and the early 1900s?
Mekhanik [1.2K]
Immigration drastically increased in the United States during the period between the Civil War and the early 1900s. This immigration boom coupled with increased development and industrial output following the Civil War led to large economic growth in the United States as well. 
7 0
3 years ago
Who was the most program music writer, and what piece is he most known for​
tatiyna

Answer:

The lines are blurred more thoroughly in the music of Franz Liszt, possibly the best-known composer of program music, whose specifically programmatic works—such as the Faust Symphony and some of his symphonic poems—are not often performed.

Explanation:

i hope this helped, can i get brainliest plz?

3 0
3 years ago
Read 2 more answers
Highlight the correct answer.
Norma-Jean [14]

Answer:

Explanation:

B

5 0
3 years ago
The Nuetrality Acr of 1936 made it illegal for Americans to?
Aleksandr-060686 [28]
Lifted the arms embargo as cash nd carry
8 0
3 years ago
Other questions:
  • Which reconstruction plan offered the least harsh terms?
    6·2 answers
  • What is the 2021 NHD Theme? Group of answer choices Conflict and Compromise in History Taking a Stand in Histoary Triumph and Tr
    8·1 answer
  • What is the definition of extraterritoriality? a An economic system b Being exempt from local law c A military strategy d Gettin
    7·1 answer
  • PLEASE HELP WILL AWARD BRAINLIEST IF CORRECT AND DONE EFFICENTLY!!
    15·1 answer
  • What do headlines such as these from the 1920s illustrate?
    6·1 answer
  • The people exercise their power by voting representatives into office
    15·1 answer
  • What are the natural wonders that can be found in Africa?
    9·1 answer
  • What message was Franklin's cartoon delivering to the delegates at the Albany Congress ?
    10·2 answers
  • What is 4.724 rounded
    10·2 answers
  • History Vocab it’s probably easy for y’all older kids so pls help me in image
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!