python project for data science coursera week 1 quiz answers

Extracting Stock Data Using a Python Library

1. From the lab exercise, in which country is AMD (Advanced Micro Devices) situated?

  • China
  • Canada
  • United States

2. In the lab exercise, to which sector does AMD (Advanced Micro Devices) belong?

  • Electronics
  • Agriculture
  • Technology

3. In the lab exercise, what is the Volume of AMD traded on the first day (first row)?

  • amd_share_price_data = amd.history(period=โ€maxโ€)
    amd_share_price_data.max()

Extracting Stock Data Using a Web Scraping

4. In the lab exercise, what is the content of the title attribute from the object soup?

  • <title>Amazon.com, Inc. (AMZN) Stock Historical Prices &amp; Data โ€“ Yahoo Finance</title>
  • (AMZN) Stock Historical Prices &amp; Data โ€“ Yahoo Finance
  • <b class=โ€Hiddenโ€>Yahoo Finance</b>

5. In the lab exercise, what are the correct names of the columns of the dataframe?

  • โ€˜Dateโ€™, โ€˜Openโ€™, โ€˜Highโ€™, โ€˜Lowโ€™
  • โ€˜Dateโ€™, โ€˜Openโ€™, โ€˜Highโ€™, โ€˜Lowโ€™, โ€˜Closeโ€™, โ€˜Volumeโ€™, โ€˜Adj Closeโ€™
  • โ€˜Dateโ€™, โ€˜Openโ€™, โ€˜Highโ€™, โ€˜Lowโ€™, โ€˜Closeโ€™, โ€˜Volumeโ€™, โ€˜Adj Closeโ€™, โ€˜maxโ€™,โ€™minโ€™

6. In the lab exercise, what is the Open of the last row in the amazon_data dataframe?

  • 3,242.36
  • 717.32
  • 656.29

Leave a Reply