Python Function That Receives String, Returns String + "!"
<p>As the title suggests, I'm just trying to create a Python function that receives a string, then returns that string with an exclamation point added to the end. </p>

<p>An input of "Hello" should return</p>

<pre><code>Hello!
</code></pre>

<p>An input of "Goodbye" should return</p>

<pre><code>Goodbye!
</code></pre>

<p>Etc. </p>

<p>Here's what I tried:</p>

<pre><code>def addExclamation(s):
    s = input("please enter a string")
    new_string = s + "!"
    return new_string

print(s(addExclamation))
</code></pre>

<p>This gave me the error message: </p>

<pre><code>NameError: name 's' is not defined on line 6
</code></pre>

<p>Why is "s" not defined? I thought I determined that s is the input within the <code>addExclamation</code> function. Thank you for your help. </p>