hw02_sol.pdf - hw02_master Homework 2 Arrays and Tables Reading Textbook chapters 4(http\/www.inferentialthinking.com\/chapters\/04\/data-types.html and

hw02_sol.pdf - hw02_master Homework 2 Arrays and Tables...

This preview shows page 1 - 3 out of 9 pages.

9/7/2017 hw02_master 1/9 Homework 2: Arrays and Tables Reading : Textbook chapters 4 () and 5 () . Please complete this notebook by filling in the cells provided. Before you begin, execute the following cell to load the provided tests. Each time you start your server, you will need to execute this cell again to load the tests. Homework 2 is due Thursday, 9/7 at 11:59pm. Start early so that you can come to office hours if you're stuck. Check the website for the office hours schedule. You will receive an early submission bonus point if you turn in your final submission by Wednesday, 9/6 at 11:59pm. Late work will not be accepted unless you have made special arrangements with your (U)GSI or the instructor. In [ ]: Important : In this homework, the ok tests will tell you whether your answer is correct, except for Parts 1, 5, & 6. In future homework assignments, correctness tests will typically not be provided. 1. Studying the Survivors The Reverend Henry Whitehead was skeptical of John Snow’s conclusion about the Broad Street pump. After the Broad Street cholera epidemic ended, Whitehead set about trying to prove Snow wrong. (The history of the event is detailed here () .) He realized that Snow had focused his analysis almost entirely on those who had died. Whitehead, therefore, investigated the drinking habits of people in the Broad Street area who had not died in the outbreak. What is the main reason it was important to study this group? 1) If Whitehead had found that many people had drunk water from the Broad Street pump and not caught cholera, that would have been evidence against Snow's hypothesis. 2) Survivors could provide additional information about what else could have caused the cholera, potentially unearthing another cause. 3) Through considering the survivors, Whitehead could have identified a cure for cholera. # Don't change this cell; just run it. import numpy as np from datascience import * from client.api.notebook import Notebook ok = Notebook('hw02.ok') _ = ok.auth(inline=True)
Image of page 1
9/7/2017 hw02_master 2/9 In [ ]: In [ ]: Note: Whitehead ended up finding further proof that the Broad Street pump played the central role in spreading the disease to the people who lived near it. Eventually, he became one of Snow’s greatest defenders. 2. Creating Arrays Question 1. Make an array called weird_numbers containing the following numbers (in the given order): 1. -2 2. the sine of 1.2 3. 3 4. 5 to the power of the cosine of 1.2 Hint: sin and cos are functions in the math module.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 9 pages?

  • Fall '17
  • Array, World population, Henry Whitehead

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors