Re: [Tutor] Python Programming exercise

2009-07-01 Thread Alan Gauld
"Daniel Sato" wrote I have been able to make the module quit after entering a password three times, but can't get it to quit right away after the correct one is password = "qwerty" guess = "0" count = 0 while count != 3: guess = raw_input("Enter your password: ") guess = str

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Sander Sweers
2009/7/1 Daniel Sato : > I have been going through some Python Programming exercises while following > the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with > the first "If" exercise listed on this page: > > http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statement

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Craig McDonald
On Wed, Jul 1, 2009 at 3:53 AM, Daniel Sato wrote: > I have been going through some Python Programming exercises while following > the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with > the first "If" exercise listed on this page: > > http://en.wikibooks.org/wiki/Python_Progr

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Dave Angel
Daniel Sato wrote: I have been going through some Python Programming exercises while following the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with the first "If" exercise listed on this page: http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statements#If_Ex

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Christian Witts
Daniel Sato wrote: I have been going through some Python Programming exercises while following the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with the first "If" exercise listed on this page: http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statements#If_Exer

Re: [Tutor] Python Programming exercise

2009-07-01 Thread bob gailer
Daniel Sato wrote: I have been going through some Python Programming exercises while following the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with the first "If" exercise listed on this page: http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statements#If_Exer

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Robert Berman
1. Pay more attention to what ends an if statement (:) also watch your indentation. 2. Code is better than my commentary. This works the way you want it to work. password = "qwerty" guess = "0" count = 0 while count != 3: guess = raw_input("Enter your password: ") guess = str(gu

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Wayne
On Tue, Jun 30, 2009 at 9:53 PM, Daniel Sato wrote: > I have been able to make the module quit after entering a password three > times, but can't get it to quit right away after the correct one is > entered. I know this is really basic, please forgive me. I have no > programming experience an

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Michiel Overtoom
Daniel Sato wrote: am having some trouble with the first "If" Don't forget the colon at the end of the line. if condition: pass Greetings, -- "The ability of the OSS process to collect and harness the collective IQ of thousands of individuals across the Internet is

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Emile van Sebille
On 6/30/2009 7:53 PM Daniel Sato said... I have been able to make the module quit after entering a password three times, but can't get it to quit right away after the correct one is entered. I know this is really basic, please forgive me. I have no programming experience and have just started

Re: [Tutor] Python Programming exercise

2009-07-01 Thread Siim Märtmaa
2009/7/1 Daniel Sato : > I have been going through some Python Programming exercises while following > the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with > the first "If" exercise listed on this page: > > http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statement

[Tutor] Python Programming exercise

2009-06-30 Thread Daniel Sato
I have been going through some Python Programming exercises while following the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with the first "If" exercise listed on this page: http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statements#If_Exercises I have been able