Talk:Non-Programmer's Tutorial for Python 3/Decisions

First of all congratulations for the great tutorial. I am thinking of translating it at my native language (greek). I would like to draw your attention at your second example. I think its not an appropriate example. This program uses only the statements after a>5 and a<=7 expressions. It has never been used the statement after "else". I think it would be useful to be executed all possible statements, at least once: My suggestion is something like this: So the statement: print("Neither test was true"), is executed when a is 4 Iliasthes (discuss • contribs) 19:02, 1 August 2011 (UTC)

I changed it according to your suggestion. I also replaced the high_low.py code with mine. I think it is better (for instance, the old code didn't give a tip after the first guess). The second exercise was also changed to fit the new high_low.py code. 194.15.124.5 (discuss) 15:06, 20 August 2012 (UTC)


 * ✅ – I changed the second example, so  is executed when   is 4 or 5. KrisLXIV (discuss • contribs) 10:34, 8 April 2013 (UTC)

Solution #2 doesn't work
Great tutorial!!!

Just wanted to point out that solution #2

Doesn't trigger after three failed attempts. You might need to check this one again ! I'm still learning python so I have no solution for you, but I wanted to alert you that this doesn't work. (It won't give the message after three attempts (or more ) ).  -- Dave -- 


 * Aside from the mistranscription (you have a comparison operator backwards), what exactly is wrong with the example? The exercise is supposed to have the user keep guessing, and once the number is found, determine whether or not the user took more than three guesses. --Sigma 7 (discuss • contribs) 16:18, 17 May 2013 (UTC)

Update
I just got it to work, believe it or not, it appears to be a syntax issue:

Notice, that the "You won" section occurs at the bottom of the "if" statements. Aside from that one change, it's fine, and yeah, I know, I made the code a bit goofy :) Thanks ==== Dave ===