<br><br><div class="gmail_quote">On Tue, Nov 2, 2010 at 3:17 PM, Glen Clark <span dir="ltr"><<a href="mailto:glenuk@gmail.com">glenuk@gmail.com</a>></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>
> the syntax is:<br>
><br>
><br>
> if True:<br>
> do something that you want to do if the condition you are testing<br>
> is True, in your case when confirmed is "y"<br>
> elif True:<br>
> optional: do something else when the above condition is false and<br>
> this condition is True.<br>
> else:<br>
> do something else when the above conditions are false.<br>
><br>
><br>
> You can try this,<br>
><br>
><br>
> if confirmed == "y":<br>
> stuff<br>
> else:<br>
> pass<br>
><br>
><br>
><br>
><br>
> On Tue, Nov 2, 2010 at 3:02 PM, Glen Clark <<a href="mailto:glenuk@gmail.com">glenuk@gmail.com</a>> wrote:<br>
> File "/home/glen/workspace/test.py", line 19<br>
> if confirmed == "y":<br>
> ^<br>
> SyntaxError: invalid syntax<br>
><br>
> Why does this not work??? PyDev says "Expected:else"<br>
><br>
> _______________________________________________<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>
><br>
><br>
<br></div></div></blockquote> change = int(input("Which item would you like to change: ")<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>