input: Write a function to scrape photos and captions from a given website using Python. The function should take a URL as input, request the HTML content, parse it using BeautifulSoup, and extract all photo URLs and their corresponding captions if available. The function should print each photo URL and caption to the console. If no caption exists for a photo, it should print "No caption".
  
  
  def scrape_photos_and_captions(url):
      from bs4 import BeautifulSoup
      import requests
  
      # Get the HTML source code
      req = requests.get(url)
      html = req.text
  
      # Parse HTML source and extract photo and caption
      soup = BeautifulSoup(html, features='lxml')
      image_divs = soup.find_all('div', {'class': 'image-gallery__image'})
  
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          print('Photo: ', src)
          if caption:
              print('Caption: ', caption.text)
          else:
              print('No caption')
          print('\n')
  
  # Test cases
  scrape_photos_and_captions('https://example.com/webpage')
  # Expected output: Printed photo URLs and captions extracted from the webpage
  
output: def scrape_photos_and_captions(url):
      from bs4 import BeautifulSoup
      import requests
  
      req = requests.get(url)
      html = req.text
  
      soup = BeautifulSoup(html, features='lxml')
      image_divs = soup.find_all('div', {'class': 'image-gallery__image'})
  
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          print('Photo: ', src)
          if caption:
              print('Caption: ', caption.text)
          else:
              print('No caption')
          print('\n')