import click

@click.command(name='hello')
@click.argument('name')
@click.option('--excited', '-e', is_flag=True)
def cli(name, excited):
    """ Given a NAME, outputs a greeting. """
    if excited:
        click.echo("Hello, {0}!".format(name))
    else:
        click.echo("Hello, {0}.".format(name))

if __name__ == '__main__':
    cli()

@@ -185,24 +185,46 @@
     
-if excited:%0A    
+punctuation = '!' if excited else '.'%0A
     
@@ -245,17 +245,19 @@
 llo, %7B0%7D
-!
+%7B1%7D
 %22.format
@@ -265,65 +265,21 @@
 name
-))%0A    else:%0A        click.echo(%22Hello, %7B0%7D.%22.format(name
+, punctuation
 ))%0A%0A

simplify hello logic