Q1. What is web scraping and how does it work?
Web scraping is the process of using a program to fetch a web page, read its HTML source code, and extract specific pieces of data. The program sends an HTTP request (just like a browser), receives the HTML back, then uses a parsing library like BeautifulSoup or Cheerio to locate elements using CSS selectors such as .price or #product-title.