"SyntaxError: Invalid Syntax" but it worked before! (Python 3.5.2 doing a tutorial for beginners)
<p>Soo I swear this code worked before! </p>

<h1>Is there a setting on IDLE that I might have accidently turned on?</h1>

<p>I'm trying to do something very simple..set variables.</p>

<p>As you can see these work:</p>

<pre><code>&gt;&gt;&gt; print("hello")
hello



&gt;&gt;&gt; def main():
        print("hey")


&gt;&gt;&gt;main()
hey
</code></pre>

<p>So when I try to recreate an example problem, you would expect these variables to work, right?</p>

<pre><code>def main():
    print("This calculates the cost of coffee.")
    print()
    n = eval(input("Enter amount of coffee in pounds: ")
    m = 10.50 * n

SyntaxError: invalid syntax
</code></pre>

<p>Why??? Why does Python 3.5.2 return "SyntaxError: invalid syntax"?</p>

<p>Thanks guys! Sorry I'm such a noob.</p>

<p>As pointed out in the comments several times, You are simply missing a closing <code>)</code> on line 4 of your program. line 4 should look like</p>

<p><code>n = eval(input("Enter amount of coffee in pounds: "))# &lt;--extra parenthesis</code></p>

<hr>

<p>Some unrelated points in your code:</p>

<ul>
<li>Why are you using <code>eval()</code>? It looks like your going for float/integer conversion, so use <code>int()</code> or <code>float()</code>.</li>
<li>Instead of adding a extra print to achieve a newline, simply say <code>print("This calculates the cost of coffee.\n")</code></li>
<li>The last two lines of your program can be condensed into a single statement: <code>n = float(input("Enter amount of coffee in pounds: "))*10.50</code></li>
</ul>

<hr>

<p>After adding my suggestions to your code, it would yield something like this:</p>

<pre><code>def main():
    print("This calculates the cost of coffee.\n")
    n = float(input("Enter amount of coffee in pounds: "))*10.50
</code></pre>

python