Skip to content

Extracting Stock Data Using a Web Scraping :Python Project for Data Science (IBM Data Analyst Professional Certificate) Answers 2025

1. Question 1

In the lab exercise, what is the content of the title attribute from the BeautifulSoup object?

  • <title>Amazon.com, Inc. (AMZN) Stock Historical Prices & Data – Yahoo Finance</title>

  • ❌ (AMZN) Stock Historical Prices & Data – Yahoo Finance

  • ❌ <b class=”Hidden”>Yahoo Finance</b>

Explanation:

soup.title returns the entire title tag, not just the text inside it.


2. Question 2

What are the correct column names of the dataframe?

  • ❌ ‘Date’, ‘Open’, ‘High’, ‘Low’

  • ‘Date’, ‘Open’, ‘High’, ‘Low’, ‘Close’, ‘Volume’, ‘Adj Close’

  • ❌ Full list with max/min

Explanation:

The Yahoo Finance table used in the lab has 7 columns with the names above.


3. Question 3

What is the Open of the last row in the amazon_data dataframe?

  • ❌ 3,242.36

  • ❌ 717.32

  • 656.29

Explanation:

In the lab dataset, the last row corresponds to the earliest date in the table, where Open = 656.29.


🧾 Summary Table

Q Correct Answer Key Concept
1 <title>Amazon.com…</title> soup.title returns full tag
2 Standard 7 Yahoo Finance columns DataFrame columns
3 656.29 Last-row Open price