<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Loops and User Input</title>
	<atom:link href="http://metaleks.net/tutorials/python/loops-and-user-input/feed" rel="self" type="application/rss+xml" />
	<link>http://metaleks.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 03 Jan 2010 15:41:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aleks</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-833</link>
		<dc:creator>Aleks</dc:creator>
		<pubDate>Mon, 07 Sep 2009 21:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-833</guid>
		<description>@LG: You should have posted your code. It&#039;s hard to tell what needs fixing. Thankfully, your error is a really simple one. Python is telling you either that your indentations are inconsistent (meaning you&#039;re using 4 spaces here, and a different amount elsewhere), or (and more likely) that &quot;count = True&quot; is misplaced. Look through your code. Should &quot;count = True&quot; be in an indented block of code, or should it be outside a block? I am almost certain that is your error, but I can&#039;t do anything to help since you haven&#039;t shown me your code! :)</description>
		<content:encoded><![CDATA[<p>@LG: You should have posted your code. It&#8217;s hard to tell what needs fixing. Thankfully, your error is a really simple one. Python is telling you either that your indentations are inconsistent (meaning you&#8217;re using 4 spaces here, and a different amount elsewhere), or (and more likely) that &#8220;count = True&#8221; is misplaced. Look through your code. Should &#8220;count = True&#8221; be in an indented block of code, or should it be outside a block? I am almost certain that is your error, but I can&#8217;t do anything to help since you haven&#8217;t shown me your code! <img src='http://metaleks.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LG</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-829</link>
		<dc:creator>LG</dc:creator>
		<pubDate>Mon, 07 Sep 2009 13:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-829</guid>
		<description>python /afs/cs.up.ac.za/user/students/s26475627/cos333_Python/cos333_python.py
  File &quot;/afs/cs.up.ac.za/user/students/s26475627/cos333_Python/cos333_python.py&quot;, line 6
    count = True
        ^
IndentationError: expected an indented block
*** Exited with status: 1 ***</description>
		<content:encoded><![CDATA[<p>python /afs/cs.up.ac.za/user/students/s26475627/cos333_Python/cos333_python.py<br />
  File &#8220;/afs/cs.up.ac.za/user/students/s26475627/cos333_Python/cos333_python.py&#8221;, line 6<br />
    count = True<br />
        ^<br />
IndentationError: expected an indented block<br />
*** Exited with status: 1 ***</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleks</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-823</link>
		<dc:creator>Aleks</dc:creator>
		<pubDate>Sun, 16 Aug 2009 05:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-823</guid>
		<description>Thanks for the comment!

You’re absolutely right, and I can’t believe that I made such a rookie error. I have changed it to just “exit” to fix things up. Since your correction uses arrays, and I haven’t covered arrays in any my tutorials yet, I couldn’t use it! Sorry, but thanks for the comment, it’s appreciated.</description>
		<content:encoded><![CDATA[<p>Thanks for the comment!</p>
<p>You’re absolutely right, and I can’t believe that I made such a rookie error. I have changed it to just “exit” to fix things up. Since your correction uses arrays, and I haven’t covered arrays in any my tutorials yet, I couldn’t use it! Sorry, but thanks for the comment, it’s appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gerlos</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-821</link>
		<dc:creator>gerlos</dc:creator>
		<pubDate>Sun, 16 Aug 2009 01:35:32 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-821</guid>
		<description>Hey! 
Your code in the last example is (semantically) wrong! This statement:
userInput == &quot;q&quot; or &quot;Q&quot; or &quot;Quit&quot; or &quot;quit&quot;

is always True, since almost one  (&quot;Q&quot;, for example) of the statements connected by &quot;or&quot; is always True!

The loops ends always, no matters what the user has typed before!

So you should change this line:
  if userInput == &quot;q&quot; or &quot;Q&quot; or &quot;Quit&quot; or &quot;quit&quot;:

In this way:
  if userInput in [&quot;q&quot;, &quot;Q&quot;, &quot;Quit&quot;, &quot;quit&quot;]:

Anyway, good tutorial, kudos! :-)</description>
		<content:encoded><![CDATA[<p>Hey!<br />
Your code in the last example is (semantically) wrong! This statement:<br />
userInput == &#8220;q&#8221; or &#8220;Q&#8221; or &#8220;Quit&#8221; or &#8220;quit&#8221;</p>
<p>is always True, since almost one  (&#8220;Q&#8221;, for example) of the statements connected by &#8220;or&#8221; is always True!</p>
<p>The loops ends always, no matters what the user has typed before!</p>
<p>So you should change this line:<br />
  if userInput == &#8220;q&#8221; or &#8220;Q&#8221; or &#8220;Quit&#8221; or &#8220;quit&#8221;:</p>
<p>In this way:<br />
  if userInput in ["q", "Q", "Quit", "quit"]:</p>
<p>Anyway, good tutorial, kudos! <img src='http://metaleks.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Nomak</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-816</link>
		<dc:creator>Rick Nomak</dc:creator>
		<pubDate>Sun, 28 Jun 2009 14:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-816</guid>
		<description>Thanks!  That interactive interactive konsole bit gave me a very good &#039;kick over the threshold&#039; to extend my tcl horizon with the python language, the other parts gave me a good base to see the logic behind the syntax the way i do in tcl...
1 + 1 = 2 Thanx!</description>
		<content:encoded><![CDATA[<p>Thanks!  That interactive interactive konsole bit gave me a very good &#8216;kick over the threshold&#8217; to extend my tcl horizon with the python language, the other parts gave me a good base to see the logic behind the syntax the way i do in tcl&#8230;<br />
1 + 1 = 2 Thanx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleks</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-36</link>
		<dc:creator>Aleks</dc:creator>
		<pubDate>Sat, 24 Jan 2009 18:03:21 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-36</guid>
		<description>Ah! Thank you, good sir! I don&#039;t know why that&#039;s there.

Corrected. :-)</description>
		<content:encoded><![CDATA[<p>Ah! Thank you, good sir! I don&#8217;t know why that&#8217;s there.</p>
<p>Corrected. <img src='http://metaleks.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Huckins</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-35</link>
		<dc:creator>Samuel Huckins</dc:creator>
		<pubDate>Wed, 07 Jan 2009 02:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-35</guid>
		<description>Thanks for the handy tutorial! One correction: in line 4 of the second code block of the &quot;The for Loop&quot; section, you need to remove the colon after the raw_input is closed. As it stands, it throws a syntax error.</description>
		<content:encoded><![CDATA[<p>Thanks for the handy tutorial! One correction: in line 4 of the second code block of the &#8220;The for Loop&#8221; section, you need to remove the colon after the raw_input is closed. As it stands, it throws a syntax error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleks</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-37</link>
		<dc:creator>Aleks</dc:creator>
		<pubDate>Tue, 09 Dec 2008 21:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-37</guid>
		<description>Glad it helped!</description>
		<content:encoded><![CDATA[<p>Glad it helped!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://metaleks.net/tutorials/python/loops-and-user-input/comment-page-1#comment-34</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 28 Nov 2008 11:00:01 +0000</pubDate>
		<guid isPermaLink="false">http://metaleks.net/tutorials/python/loops-and-user-input/#comment-34</guid>
		<description>Good article, really helped me to grasp the basic concepts.
It seems like to many tutorials try to throw you in &quot;deep water&quot; before you&#039;ve learned to doggy paddle :\
Keep up the good work, and thanks!
-Jim</description>
		<content:encoded><![CDATA[<p>Good article, really helped me to grasp the basic concepts.<br />
It seems like to many tutorials try to throw you in &#8220;deep water&#8221; before you&#8217;ve learned to doggy paddle :\<br />
Keep up the good work, and thanks!<br />
-Jim</p>
]]></content:encoded>
	</item>
</channel>
</rss>
