题目内容

Download the code used in the lecture "Finding Pi". If we now want to estimate the constant from the picture above, what should the number '4' in the line: return 4*(inCircle/float(numNeedles)) be changed to?______

查看答案
更多问题

The file L4P5.zip contains words.txt, a list of words, and histogramfun.py, a template for a histogram function. In this problem, you will be writing code to plot a histogram of the proportion of vowels in each word of a given wordList. Vowels are 'A', 'E', 'I', 'O', 'U'.Make sure to put a title and appropriate labels on the plot.When you have produced a plot, answer the following question, to check your solution and your understanding of it.Using the code you wrote to investigate, do more words in the word list have a vowel proportion greater than or less than 0.5?

A. More words have a vowel proportion greater than 0.5
B. More words have a vowel proportion less than 0.5

For each of the following choices, indicate where computing the Coefficient of Variation would be invalid.

A. Daily Temperature in Celsius for the city of Boston
B. Heights of children
C. Number of lines of code in each function in all problem sets for 6.00.2x
D. The X coordinate of a drunk in the random walk
E. The distance a drunk ended up away from the starting point in the random walk

Which of the following populations has the highest coefficient of variation?

A. [1, 2, 3]
B. [11, 12, 13]
C. [0.1, 0.1, 0.1]

You are taking samples of the ages of two populations, A and B. Population A is all the residents of San Francisco, while Population B is all the residents of Los Angeles.The sample from Population A has a mean of 35 and a standard deviation of 1. The sample from Population B has a mean of 45 and a standard deviation of 15. Which of the following are certain?

A. You will not find an individual in Population A that is over the age of 37.
B. The average age of Population A is lower than the average age of Population B.
C. The average age of the sample of Population A is lower than the average age of the sample of Population B.
D. If the sample size of each population is 10, then you can conclude that your sample accurately represents the population.
E. A sample size of 1M is more appropriate than a sample size of 10 for these populations.

答案查题题库