def dict_to_str(d):
    """
    Given a dictionary d, return a string with 
    each entry in the form 'key: value' and entries
    separated by newlines.
    """
    vals = []
    for k in d.keys():
        vals.append('{}: {}'.format(k, d[k]))
    v = '\n'.join(vals)
    return v