def construct_sent(word, table):
    "Prints a random sentence starting with word, sampling from\n    table.\n\n    >>> table = {'Wow': ['!'], 'Sentences': ['are'], 'are': ['cool'], 'cool': ['.']}\n    >>> construct_sent('Wow', table)\n    'Wow!'\n    >>> construct_sent('Sentences', table)\n    'Sentences are cool.'\n    "
    import random
    result = ''
    while (word not in ['.', '!', '?']):
        '*** YOUR CODE HERE ***'
    return (result.strip() + word)
Prints a random sentence starting with word, sampling from
table.

>>> table = {'Wow': ['!'], 'Sentences': ['are'], 'are': ['cool'], 'cool': ['.']}
>>> construct_sent('Wow', table)
'Wow!'
>>> construct_sent('Sentences', table)
'Sentences are cool.'
def construct_sent(word, table):
    "Prints a random sentence starting with word, sampling from\n    table.\n\n    >>> table = {'Wow': ['!'], 'Sentences': ['are'], 'are': ['cool'], 'cool': ['.']}\n    >>> construct_sent('Wow', table)\n    'Wow!'\n    >>> construct_sent('Sentences', table)\n    'Sentences are cool.'\n    "
    import random
    result = 
    while (word not in ['.', '!', '?']):
        '*** YOUR CODE HERE ***'
    return (result.strip() + word)