Re: Replace blanks with letter

2013-08-22 Thread Dave Angel
eschneide...@comcast.net wrote: > I wanted the program to stop only after all the letters were typed; why in > the world would I try to write a program with blanks for each letter that > seem intended to be filled, only to have it stop if the last letter is typed, > or have to type each letter

Re: Replace blanks with letter

2013-08-22 Thread eschneider92
I wanted the program to stop only after all the letters were typed; why in the world would I try to write a program with blanks for each letter that seem intended to be filled, only to have it stop if the last letter is typed, or have to type each letter so many times until its processed? If you

Re: Replace blanks with letter

2013-08-22 Thread eschneider92
I wanted the program to stop only after all the letters were typed; why in the world would I try to write a program with blanks for each letter that seem intended to be filled, only to have it stop if the last letter is typed, or have to type each letter so many times until its processed? If you

Re: Replace blanks with letter

2013-08-21 Thread John Gordon
In <89146bb1-fb60-4746-93e2-6cb59cfbc...@googlegroups.com> eschneide...@comcast.net writes: > Thanks. I am running into a bunch of problems with the following code, all > of which are clear when running the program No, they're not clear. We can see what the code does, obviously, but we don't kn

Re: Replace blanks with letter

2013-08-21 Thread Dave Angel
eschneide...@comcast.net wrote: > Thanks. I am running into a bunch of problems with the following code, all of > which are clear when running the program > > import random > letters='abcdefg' > blanks='_'*len(letters) > print('type letters from a to g') > print(blanks) > for i in range(len(let

Re: Replace blanks with letter

2013-08-21 Thread Chris Angelico
On Wed, Aug 21, 2013 at 5:49 PM, wrote: > Thanks. I am running into a bunch of problems with the following code, all of > which are clear when running the program Some of us don't have time to just execute arbitrary code in some safe environment, so we'd REALLY rather you paste in the exceptio

Re: Replace blanks with letter

2013-08-21 Thread eschneider92
Thanks. I am running into a bunch of problems with the following code, all of which are clear when running the program import random letters='abcdefg' blanks='_'*len(letters) print('type letters from a to g') print(blanks) for i in range(len(letters)): if letters[i] in input(): bla

Re: Replace blanks with letter

2013-08-20 Thread Dave Angel
eschneide...@comcast.net wrote: > Is there also a way to have the code remember what I typed and not stop after > the first letter the user types? For example, if I typed 'a' once, thus > returning 'a__', and then typed in 'b', I want the code to return > 'ab_' and so on. I wasn't clear

Re: Replace blanks with letter

2013-08-20 Thread eschneider92
Is there also a way to have the code remember what I typed and not stop after the first letter the user types? For example, if I typed 'a' once, thus returning 'a__', and then typed in 'b', I want the code to return 'ab_' and so on. I wasn't clear about this part in my original post. Tha

Re: Replace blanks with letter

2013-08-20 Thread Peter Otten
eschneide...@comcast.net wrote: > I'm trying to replace the blank(_) with the letter typed in by the user, > in the appropriate blank(_) spot where the letter should be (where is in > the letters list). > > letters='abcdefg' > blanks='_ '*len(letters) > print('type letter from a to g') > print(bl

Re: Replace blanks with letter

2013-08-20 Thread Fábio Santos
On 20 Aug 2013 09:42, wrote: > > I'm trying to replace the blank(_) with the letter typed in by the user, in the appropriate blank(_) spot where the letter should be (where is in the letters list). > > letters='abcdefg' > blanks='_ '*len(letters) > print('type letter from a to g') > print(blanks)

Replace blanks with letter

2013-08-20 Thread eschneider92
I'm trying to replace the blank(_) with the letter typed in by the user, in the appropriate blank(_) spot where the letter should be (where is in the letters list). letters='abcdefg' blanks='_ '*len(letters) print('type letter from a to g') print(blanks) input1=input() for i in range(len(letters