<div dir="ltr">Sorry, sent before finishing...<div><br></div><div style>If you changed raw_input, as asked.</div><div style>Now, it complains about print 'Game Over'</div><div style>Should become print('Game Over')</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 16, 2013 at 12:10 AM, Jos Kerc <span dir="ltr"><<a href="mailto:joskerc@gmail.com" target="_blank">joskerc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">No, not same. At lea</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">
On Fri, Feb 15, 2013 at 11:44 PM, Joel Goldstick <span dir="ltr"><<a href="mailto:joel.goldstick@gmail.com" target="_blank">joel.goldstick@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">so copy the code and the error message here<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Fri, Feb 15, 2013 at 5:42 PM, Deborah Piotrowski <span dir="ltr"><<a href="mailto:spiceninja4u@gmail.com" target="_blank">spiceninja4u@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I did what you said, nothing changed.<div>same errors, same syntax message.</div><div>I suggest you run it on your IDLE to see if it works.<div>

<div><div>
<div><br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 3:31 PM, Joel Goldstick <span dir="ltr"><<a href="mailto:joel.goldstick@gmail.com" target="_blank">joel.goldstick@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Fri, Feb 15, 2013 at 5:29 PM, Joel Goldstick <span dir="ltr"><<a href="mailto:joel.goldstick@gmail.com" target="_blank">joel.goldstick@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you using python 2 or python 3?  <br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>




On Fri, Feb 15, 2013 at 5:28 PM, Deborah Piotrowski <span dir="ltr"><<a href="mailto:spiceninja4u@gmail.com" target="_blank">spiceninja4u@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ok, so I made a shortcut to IDLE(GUI) and I open it up. click "New Window" and type in the code:<div>





<div>print "Game Over"</div><div>raw_input("\n\nPress Enter Key to exit")</div></div><div>and save the file on my desktop.</div>
<div>I double-click it and it opens a black window with gray text for a split second and if you look quickly enough then you can see "Invalid Sytnax".</div><div>If I do the same code in the Interactive Window then it highlights "raw_input" and says "Invalid Syntax"<div>





<div><br></div></div></div></blockquote></div><div>Are you using python 2 or python 3?   <br></div></div></div></div></blockquote><div><br></div></div><div>Sorry, you said above python 3.  In python 3 raw_input was changed to input.  so change that and it will work for you.<br>




</div><div>There are some differences between 2 and 3 that you will need to look out for.  Go to the <a href="http://python.org" target="_blank">python.org</a> site to learn about them.  Your book was written for python 2 it seems<br>



 <br>
</div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div><div><div>
<br><div class="gmail_quote">On Fri, Feb 15, 2013 at 3:12 PM, Joel Goldstick <span dir="ltr"><<a href="mailto:joel.goldstick@gmail.com" target="_blank">joel.goldstick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">






<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 5:09 PM, Deborah Piotrowski <span dir="ltr"><<a href="mailto:spiceninja4u@gmail.com" target="_blank">spiceninja4u@gmail.com</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It Didn't work.</blockquote><div><br></div><div>First of all, reply to all.  You are sending messages to me only, not to the group.  Other's may be able to help you better than I can.<br>







<br>Second.  "It didn't work" is not a useful answer.<br><br></div><div>So you have a file with two lines in it.  The first has a print statement.  The second has a raw_input statement.  When you run it, what happens exactly? Do you get a traceback message telling you what the error is, and on what line?<br>







<br> <br></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 3:05 PM, Joel Goldstick <span dir="ltr"><<a href="mailto:joel.goldstick@gmail.com" target="_blank">joel.goldstick@gmail.com</a>></span> wrote:<br>








<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 5:03 PM, Deborah Piotrowski <span dir="ltr"><<a href="mailto:spiceninja4u@gmail.com" target="_blank">spiceninja4u@gmail.com</a>></span> wrote:<br>









<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 2:58 PM, Joel Goldstick <span dir="ltr"><<a href="mailto:joel.goldstick@gmail.com" target="_blank">joel.goldstick@gmail.com</a>></span> wrote:<br>









<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Fri, Feb 15, 2013 at 4:45 PM, Deborah Piotrowski <span dir="ltr"><<a href="mailto:spiceninja4u@gmail.com" target="_blank">spiceninja4u@gmail.com</a>></span> wrote:<br>











<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<div><br></div><div><br></div><div>I am very new to Python, I am using the e-book "Python Programming for the Absolute Beginner" and am starting with a simple "Game Over" Program.  This is the code:which is extremely simple!<br clear="all">












<div>print"Game Over" raw_input("\n\nPress Enter Key to exit")</div></div></blockquote><div><br></div></div><div>welcome Nicholas<br><br><br></div><div>One important thing about python is indentation is important.  You have presented your code in a way that can't be.  Can you actually copy your program and paste it into an email message.  Also, Windows, Linux, Mac?<br>











<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div>That's it. It is supposed to bring up a window that says "Game Over" and at the bottom say "Press enter Key to exit" and when you press the enter key it is supposed to exit(big suprise).</div>












<div>But all it does is highlight "raw_input" and says "invalid syntax" Now, if I just put "print "Game Over"" then it says Game Over UNDERNEATH the code I just printed!</div><div>











now I am following the book to the <i>pixel</i> and that is not what is supposed to happen!</div>
Please email me back as soon as you get this...(if you are not to busy). </div><div><br></div><div>Thanks,<span style="font-family:'comic sans ms',sans-serif">Nicholas </span></div>
<br></div><span><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
<br></font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br>










</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"></div></div><div>Sorry, I am using Windows 7 Ultimate 32-bit with Python 3.3</div><div>Here is the code in exact form</div><div>print "Game Over"</div><div>     raw_input("\n\nPress Enter Key to Exit")</div>










Thanks,<br><font face="comic sans ms, sans-serif">Nicholas </font>
</blockquote></div><br></div></div></div><div class="gmail_extra">You need to unindent the raw_input like so:<div><br><br><div>print "Game Over"</div><div>raw_input("\n\nPress Enter Key to Exit")</div>









<br></div></div><div class="gmail_extra">In python you indent code blocks (like for loops, if statements, function blocks, etc.).  You can't just indent from one line to the next in sequential code or you will be told its a syntax error<br>









<br></div><div><div class="gmail_extra"><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><font face="comic sans ms, sans-serif">Nicholas J. Piotrowski</font>
</font></span></blockquote></div></div></div><div><div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br>
</div>
</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><font face="comic sans ms, sans-serif">Nicholas J. Piotrowski</font>
</font></span></div>
</blockquote></div></div></div><div><div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div></div></div>
</blockquote></div></div></div><div><div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><font face="comic sans ms, sans-serif">Nicholas J. Piotrowski</font>
</font></span></div></div></div>
</blockquote></div><div><div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div></div>
<br></div></div>_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org" target="_blank">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></blockquote></div><br></div>
</blockquote></div><br></div>