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

What is the content of the title attribute from the object soup in the lab exercise?

  • <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>

Explanation:
The BeautifulSoup soup.title returns the full <title>...</title> tag exactly as shown.


2️⃣ Question 2

What are the correct column names of the dataframe?

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

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

  • ❌ Add max/min

Explanation:
Yahoo Finance historical data always contains these 7 standard columns.


3️⃣ Question 3

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

  • ❌ 3,242.36

  • ❌ 717.32

  • 656.29

Explanation:
In the lab, the last row corresponds to the earliest date, where Open = 656.29.


🧾 Summary Table

Q Correct Answer Key Concept
1 Full <title> tag BeautifulSoup extraction
2 7-column Yahoo Finance format DataFrame structure
3 656.29 Historical Open price