Re: This could be an interesting error

2014-09-01 Thread Mark Lawrence
On 01/09/2014 03:53, Steven D'Aprano wrote: Mark Lawrence wrote: return (pigword) These^ ^ Those are parenthesis :P But not having to use them is a time saver. Thanks No they are round brackets, as opposed to square or curly. True, they are round brackets, but

Re: This could be an interesting error

2014-09-01 Thread Rustom Mody
On Monday, September 1, 2014 10:42:46 AM UTC+5:30, Chris Angelico wrote: On Mon, Sep 1, 2014 at 2:55 PM, Larry Hudson wrote: While this is definitely OT, I strongly suggest you take the time to learn to touch-type. (Actually, I would recommend it for everyone.) It's true that it will take

Re: This could be an interesting error

2014-09-01 Thread Gregory Ewing
Steven D'Aprano wrote: or words in Foreign like cwm Seeing that w is a vowel in Welsh, there should probably be a special version of the program for Welsh speakers. (Welshlatin? Pigwelsh?) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

This could be an interesting error

2014-08-31 Thread Seymore4Head
import math import random import sys ex='Hey buddy get away from the car' newex = ex.split() sentence= print (newex) wait = input ( Wait) def pigword(test): for x in range(len(test)): if test[x] in AEIOUaeiou: stem = test [x:] prefix = test [:x]

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
I forgot to mention this is supposed to be piglatin. It prints the prefix and the suffix before printing the translated word. On Sun, 31 Aug 2014 17:02:51 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: import math import random import sys ex='Hey buddy get away from the car' newex =

Re: This could be an interesting error

2014-08-31 Thread Mark Lawrence
On 31/08/2014 22:02, Seymore4Head wrote: import math import random import sys ex='Hey buddy get away from the car' newex = ex.split() sentence= print (newex) wait = input ( Wait) def pigword(test): for x in range(len(test)): Please read up on how to use for loops as the above

Re: This could be an interesting error

2014-08-31 Thread MRAB
On 2014-08-31 22:02, Seymore4Head wrote: import math import random import sys ex='Hey buddy get away from the car' newex = ex.split() sentence= print (newex) wait = input ( Wait) def pigword(test): for x in range(len(test)): if test[x] in AEIOUaeiou: stem =

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Sun, 31 Aug 2014 22:38:12 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2014 22:02, Seymore4Head wrote: import math import random import sys ex='Hey buddy get away from the car' newex = ex.split() sentence= print (newex) wait = input ( Wait) def

Re: This could be an interesting error

2014-08-31 Thread Michael Torrie
On 08/31/2014 03:02 PM, Seymore4Head wrote: def pigword(test): for x in range(len(test)): if test[x] in AEIOUaeiou: stem = test [x:] prefix = test [:x] pigword = stem + prefix + ay print (Stem ,stem) print

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Sun, 31 Aug 2014 22:53:01 +0100, MRAB pyt...@mrabarnett.plus.com wrote: On 2014-08-31 22:02, Seymore4Head wrote: import math import random import sys ex='Hey buddy get away from the car' newex = ex.split() sentence= print (newex) wait = input ( Wait) def pigword(test):

Re: This could be an interesting error

2014-08-31 Thread Mark Lawrence
On 31/08/2014 23:04, Seymore4Head wrote: On Sun, 31 Aug 2014 22:38:12 +0100, Mark Lawrence This is Python so please get rid of those unnecessary brackets. Having brackets must have been required in earlier versions maybe. No :) -- My fellow Pythonistas, ask not what our language can do

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Sun, 31 Aug 2014 16:10:27 -0600, Michael Torrie torr...@gmail.com wrote: On 08/31/2014 03:02 PM, Seymore4Head wrote: def pigword(test): for x in range(len(test)): if test[x] in AEIOUaeiou: stem = test [x:] prefix = test [:x] pigword = stem

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Sun, 31 Aug 2014 22:38:12 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2014 22:02, Seymore4Head wrote: import math import random import sys ex='Hey buddy get away from the car' newex = ex.split() sentence= print (newex) wait = input ( Wait) def

Re: This could be an interesting error

2014-08-31 Thread Mark Lawrence
On 31/08/2014 23:42, Seymore4Head wrote: On Sun, 31 Aug 2014 22:38:12 +0100, Mark Lawrence Unnecessary brackets? I tried deleting the brackets and that doesn't seem to work. I tried changing the brackets to parenthesizes and that didn't work. Although I would prefer brackets to parenthesizes

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Sun, 31 Aug 2014 16:10:27 -0600, Michael Torrie torr...@gmail.com wrote: On 08/31/2014 03:02 PM, Seymore4Head wrote: def pigword(test): for x in range(len(test)): if test[x] in AEIOUaeiou: stem = test [x:] prefix = test [:x] pigword = stem

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Mon, 01 Sep 2014 00:21:14 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2014 23:42, Seymore4Head wrote: On Sun, 31 Aug 2014 22:38:12 +0100, Mark Lawrence Unnecessary brackets? I tried deleting the brackets and that doesn't seem to work. I tried changing the brackets to

Re: This could be an interesting error

2014-08-31 Thread MRAB
On 2014-09-01 01:04, Seymore4Head wrote: On Sun, 31 Aug 2014 16:10:27 -0600, Michael Torrie torr...@gmail.com wrote: On 08/31/2014 03:02 PM, Seymore4Head wrote: def pigword(test): for x in range(len(test)): if test[x] in AEIOUaeiou: stem = test [x:] prefix

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Mon, 01 Sep 2014 01:23:36 +0100, MRAB pyt...@mrabarnett.plus.com wrote: On 2014-09-01 01:04, Seymore4Head wrote: On Sun, 31 Aug 2014 16:10:27 -0600, Michael Torrie torr...@gmail.com wrote: On 08/31/2014 03:02 PM, Seymore4Head wrote: def pigword(test): for x in range(len(test)):

Re: This could be an interesting error

2014-08-31 Thread Mark Lawrence
On 01/09/2014 01:08, Seymore4Head wrote: On Mon, 01 Sep 2014 00:21:14 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2014 23:42, Seymore4Head wrote: On Sun, 31 Aug 2014 22:38:12 +0100, Mark Lawrence Unnecessary brackets? I tried deleting the brackets and that doesn't seem to

Re: This could be an interesting error

2014-08-31 Thread Ned Batchelder
On 8/31/14 8:56 PM, Mark Lawrence wrote: On 01/09/2014 01:08, Seymore4Head wrote: On Mon, 01 Sep 2014 00:21:14 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2014 23:42, Seymore4Head wrote: On Sun, 31 Aug 2014 22:38:12 +0100, Mark Lawrence Unnecessary brackets? I tried deleting

Re: This could be an interesting error

2014-08-31 Thread Steven D'Aprano
Seymore4Head wrote: 'my' doesn't contain a vowel, therefore the condition of the 'if' statement in 'pigword' is never true, therefore it never binds to the name 'pigword'. Ah.   The piglatin example says to use y as a vowel.  I forgot to include it. Doesn't matter. What if one of the words

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Mon, 01 Sep 2014 12:12:20 +1000, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Seymore4Head wrote: 'my' doesn't contain a vowel, therefore the condition of the 'if' statement in 'pigword' is never true, therefore it never binds to the name 'pigword'. Ah.   The piglatin example

Re: This could be an interesting error

2014-08-31 Thread Steven D'Aprano
Mark Lawrence wrote: return (pigword) These^ ^ Those are parenthesis :P But not having to use them is a time saver. Thanks No they are round brackets, as opposed to square or curly. True, they are round brackets, but the word parentheses is actually older.

Re: This could be an interesting error

2014-08-31 Thread Seymore4Head
On Sun, 31 Aug 2014 22:12:10 -0400, Ned Batchelder n...@nedbatchelder.com wrote: On 8/31/14 8:56 PM, Mark Lawrence wrote: On 01/09/2014 01:08, Seymore4Head wrote: On Mon, 01 Sep 2014 00:21:14 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2014 23:42, Seymore4Head wrote: On

Re: This could be an interesting error

2014-08-31 Thread Michael Torrie
On 08/31/2014 06:04 PM, Seymore4Head wrote: for x,letter in enumerate(word): # x is index (position), letter is the value at that index if letter in AEIOUaeiou: I tried changing: for x in range(len(test)): to for x in enumerate(test): Read my example again. You missed

Re: This could be an interesting error

2014-08-31 Thread Michael Torrie
On 08/31/2014 10:15 PM, Michael Torrie wrote: On 08/31/2014 06:04 PM, Seymore4Head wrote: for x,letter in enumerate(word): # x is index (position), letter is the value at that index if letter in AEIOUaeiou: I tried changing: for x in range(len(test)): to for x in

Re: This could be an interesting error

2014-08-31 Thread Larry Hudson
On 08/31/2014 07:54 PM, Seymore4Head wrote: [snip] Since I don't ever expect to be able to type them without thinking about them, a standard keyboard could come with half sized keys on the sides. While this is definitely OT, I strongly suggest you take the time to learn to touch-type.

Re: This could be an interesting error

2014-08-31 Thread Chris Angelico
On Mon, Sep 1, 2014 at 2:55 PM, Larry Hudson org...@yahoo.com.dmarc.invalid wrote: While this is definitely OT, I strongly suggest you take the time to learn to touch-type. (Actually, I would recommend it for everyone.) It's true that it will take time, effort, practice and diligence,