input: Write a python function to scrape data from a given URL, extracting 'name' from the 'title' attribute and 'value' from the text within 'div' elements.
  assert scrape_data('http://example.com')==[{'name': 'example', 'value': 'Example Domain'}]
  assert scrape_data('http://example2.com')==[{'name': 'example2', 'value': 'Another Example Domain'}]
  assert scrape_data('http://example3.com')==[{'name': 'example3', 'value': 'Yet Another Example Domain'}]
output: def scrape_data(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      
      data = []
      title = soup.title.string
      divs = soup.find_all('div')
      
      for div in divs:
          data.append({'name': title.lower().replace(' ', ''), 'value': div.text.strip()})
          
      return data