Re: [Tutor] closing the window through code

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 19:36, Max Patient wrote: > my task is to create a password checker and one of the > criteria is to have a quit option. What does the quit do? Quit the login? or quit the application? Based on your subject line I'm assuming just quit the login - but then how would you do anything in

Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 22:39, Marc Tompkins wrote: >>> Probably the best programming test there is look at code >>> that's already been developed, >> >> It is what we did with the bug finding test. > My test was, fortunately for me, not a start-from-scratch FizzBuzz problem, > but debugging a report module

[Tutor] closing the window through code

2017-10-01 Thread Max Patient
Hi there i am preparing for a mock exam using python and was wondering if you can help, my task is to create apassword checker and one of the criteria is to have a quit option. i have looked and looked but can't seem to find a bit of code allowing to do this! if there is any way you coild help me

Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Marc Tompkins
On Sun, Oct 1, 2017 at 12:48 PM, Alan Gauld via Tutor wrote: > But to address another issue raised by Mats: > > Probably the best programming test there is look at code > > that's already been developed, > > Very true and in an ideal world what you would do, but... > > It is what we did with the

Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 16:09, Steven D'Aprano wrote: >> The fizzbuzz one is definitely a bit too simplistic, but the one >> cited by McConnel (reverse a linked list in C) is typical of >> the kind of question we used. And yes, most candidates failed. > > I would have *no idea* how to traverse a singly-link

[Tutor] Fwd: Python programming for the absolute beginner

2017-10-01 Thread boB Stepp
-- Forwarded message -- From: Howard B Date: Sun, Oct 1, 2017 at 2:20 PM Subject: Re: [Tutor] Python programming for the absolute beginner To: boB Stepp The 2010 copyright version, ISBN 978-1-4354-5500-9, discusses installing Python 3.1 (main text on page 5, and Appendix A on pa

Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Mats Wichmann
On 10/01/2017 09:09 AM, Steven D'Aprano wrote: > On Sun, Oct 01, 2017 at 12:04:13PM +0100, Alan Gauld via Tutor wrote: > >> The fizzbuzz one is definitely a bit too simplistic, but the one >> cited by McConnel (reverse a linked list in C) is typical of >> the kind of question we used. And yes, mos

Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Steven D'Aprano
On Sun, Oct 01, 2017 at 12:04:13PM +0100, Alan Gauld via Tutor wrote: > The fizzbuzz one is definitely a bit too simplistic, but the one > cited by McConnel (reverse a linked list in C) is typical of > the kind of question we used. And yes, most candidates failed. > > Some of that is interview ne

Re: [Tutor] Most common words in a text file

2017-10-01 Thread Mats Wichmann
On 09/30/2017 11:12 AM, Sri G. wrote: > I'm learning programming with Python. > > I’ve written the code below for finding the most common words in a text > file that has about 1.1 million words. It's working fine, but I believe > there is always room for improvement. > > When run, the function in

Re: [Tutor] Most common words in a text file

2017-10-01 Thread Alan Gauld via Tutor
On 30/09/17 18:12, Sri G. wrote: > import sysimport collections I assume that should be two lines? But you can also import multiple modules on a single line. import sys, collections Although some folks don't like that style. > def find_most_common_words(textfile, top=10): > ''' Returns th

Re: [Tutor] Beginner's guessing game

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 09:38, Steve Lett wrote: > Can u please tell me why this program does not work in line 28? That is > guessesTaken. It reads 0 when it should be a larger number. > > I am a beginner having another try to get it! > > Thank you, Steve Welcome Steve, but I can't see any program? Did you

Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 06:56, boB Stepp wrote: > I definitely was *not* looking for a pat on the back. I just could > not believe that "FizzBuzz" (Or similar questions.) would ever be > needed in a job interview for programming/software engineering. The fizzbuzz one is definitely a bit too simplistic, b

Re: [Tutor] Beginner's guessing game

2017-10-01 Thread Joel Goldstick
On Sun, Oct 1, 2017 at 4:38 AM, Steve Lett wrote: > Can u please tell me why this program does not work in line 28? That is > guessesTaken. It reads 0 when it should be a larger number. > > I am a beginner having another try to get it! > > Thank you, Steve > __

[Tutor] Beginner's guessing game

2017-10-01 Thread Steve Lett
Can u please tell me why this program does not work in line 28? That is guessesTaken. It reads 0 when it should be a larger number. I am a beginner having another try to get it! Thank you, Steve ___ Tutor maillist - Tutor@python.org To unsubscribe or

Re: [Tutor] logging to cmd.exe

2017-10-01 Thread Mark Lawrence via Tutor
On 26/09/2017 12:22, Albert-Jan Roskam wrote: PS: sorry about the missing quote (>>) markers. Hotmail can't do this. Is Gmail better? > Get a decent email client and it'll do the work for you. I use Thunderbird on Windows with hotmail, gmail and yahoo addresses and never have a problem.

Re: [Tutor] Most common words in a text file

2017-10-01 Thread Mark Lawrence via Tutor
On 30/09/2017 18:12, Sri G. wrote: I'm learning programming with Python. I’ve written the code below for finding the most common words in a text file that has about 1.1 million words. It's working fine, but I believe there is always room for improvement. When run, the function in the script get