Human: What is a good Python program to check if a URL is valid. Assistant: 
Here is a Python program to check if a URL is valid

import urllib.request, urllib.parse, urllib.error

def is_valid_url(url):
    """
    Check if a url is valid.

    :param url: The url.
    :return: True if the url is valid, False otherwise.
    """
    if not url.startswith('http://'):
        return False
    if not url.endswith('/'):
        return False
    return True

# Enter the url
url = "http://www.google.com"

# Calling the function
print((is_valid_url(url)))

#Example Output
# False

#Remember to inspect code for bugs.