How to print function on if statement?
<p>How do I print the function 'play' in the if statement on line 5?</p>

<pre><code>print("Deal 'Em\nby Imago Games")
print("1. Play\n2. Credits")
select = input()
if select == 1:
    def play()
elif select == 1:
    print("Bye")
def play():
    print("Welcome to Deal 'Em\nLet me teach you the basics!")
</code></pre>

<p>There are three major problems in your code:</p>

<ul>
<li><code>play()</code> is defined before usage. You have to define the function earlier in your code.</li>
<li>to call the function use <code>play()</code> without <code>def</code></li>
<li>your <code>elif</code> has the same condition as the <code>if</code> and will never be executed</li>
</ul>

python