<br><br><div class="gmail_quote">On Tue, Nov 2, 2010 at 3:17 PM, Glen Clark <span dir="ltr">&lt;<a href="mailto:glenuk@gmail.com">glenuk@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I tried that and it still does not work.<br>
<div><div></div><div class="h5"><br>
On Tue, 2010-11-02 at 15:13 -0400, James Reynolds wrote:<br>
&gt; the syntax is:<br>
&gt;<br>
&gt;<br>
&gt; if True:<br>
&gt;      do something that you want to do if the condition you are testing<br>
&gt; is True, in your case when confirmed is &quot;y&quot;<br>
&gt; elif True:<br>
&gt;      optional: do something else when the above condition is false and<br>
&gt; this condition is True.<br>
&gt; else:<br>
&gt;      do something else when the above conditions are false.<br>
&gt;<br>
&gt;<br>
&gt; You can try this,<br>
&gt;<br>
&gt;<br>
&gt; if confirmed == &quot;y&quot;:<br>
&gt;     stuff<br>
&gt; else:<br>
&gt;     pass<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 2, 2010 at 3:02 PM, Glen Clark &lt;<a href="mailto:glenuk@gmail.com">glenuk@gmail.com</a>&gt; wrote:<br>
&gt;          File &quot;/home/glen/workspace/test.py&quot;, line 19<br>
&gt;            if confirmed == &quot;y&quot;:<br>
&gt;                               ^<br>
&gt;         SyntaxError: invalid syntax<br>
&gt;<br>
&gt;         Why does this not work??? PyDev says &quot;Expected:else&quot;<br>
&gt;<br>
&gt;         _______________________________________________<br>
&gt;         Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
&gt;         To unsubscribe or change subscription options:<br>
&gt;         <a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
&gt;<br>
&gt;<br>
<br></div></div></blockquote>  change = int(input(&quot;Which item would you like to change: &quot;)<br><br>In the line about you have mismatched parentheses.  This confuses the parser<br><br>
 <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div class="h5">
_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Joel Goldstick<br><br>