On Fri, 09 Aug 2013 16:34:48 -0700, eschneider92 wrote:
> What does global mean?
Hi eschneider92,
A few bits of advice:
- You may like to actually sign your emails with a real name, or at least
an alias that you want to be called, otherwise we'll just call you by
your email address, and apar
On 10 August 2013 00:34, wrote:
> What does global mean?
Python has "scopes" for its variables. Most programming languages do.
A "scope" is a restriction on where variables exist -- they exist only
within the scope.
This can be seen in this example:
def function():
# A new "scope"
I'm sorry, but I still don't understand how it applies to my problem. Thanks
for everyone's patience.
--
http://mail.python.org/mailman/listinfo/python-list
On 10/08/2013 00:40, eschneide...@comcast.net wrote:
(I forgot to post this with my last post.)
Also, I don't understand any part of the following example, so there's no
specific line that's confusing me. Thanks for the help btw.
You don't understand _any_ of it?
> var = 42
Here you're assi
(I forgot to post this with my last post.)
Also, I don't understand any part of the following example, so there's no
specific line that's confusing me. Thanks for the help btw.
var = 42
def myfunc():
var = 90
print "before:", var
myfunc()
print "after:", var
def myfunc():
globa
(I forgot to post this with my last post.)
Also, I don't understand any part of the following example, so there's no
specific line that's confusing me. Thanks for the help btw.
var = 42
def myfunc():
var = 90
print "before:", var
myfunc()
print "after:", var
def myfunc():
glo
What does global mean?
--
http://mail.python.org/mailman/listinfo/python-list
On 10 August 2013 00:14, wrote:
> I don't understand any of the advice any of you have given.
What about it don't you understand? Pick a sentence you don't
understand and throw it back at us. If you understand all the
sentences but not how they come together, say so. If there's a leap
that you d
Thanks, though me not utilizing any of the other advice wasn't from lack of
trying; I couldn't understand any of it. I get it now that I have a corrrect
example code in front of me.
--
http://mail.python.org/mailman/listinfo/python-list
I don't understand any of the advice any of you have given.
--
http://mail.python.org/mailman/listinfo/python-list
On 9 August 2013 23:27, wrote:
> This is what I ended up with btw. Does this insult anyone's more well attuned
> Python sensibilities?
...
Yes.
You didn't listen to any of the advice we've been giving you. You've
had *much* better answers given than this.
Start from the top.
We need letter
This is what I ended up with btw. Does this insult anyone's more well attuned
Python sensibilities?
letters='abcdefghijkl'
def repeat():
print('wanna go again?')
batman=input()
if batman in ('y','yes'):
main()
else:
return
def main():
print('guess a letter')
This is what I ended up with btw. Does this insult anyone's more well-attuned
Pythonic sensibilities?
letters='abcdefghijkl'
def repeat():
print('wanna go again?')
batman=input()
if batman in ('y','yes'):
main()
else:
return
def main():
print('guess a
Le jeudi 8 août 2013 22:29:00 UTC+2, Terry Reedy a écrit :
> On 8/8/2013 7:41 AM, Chris Angelico wrote:
>
> > On Thu, Aug 8, 2013 at 7:20 AM, wrote:
>
> > def z2():
>
> >> ... letters = 'abc'
>
> >> ... while True:
>
> >> ... c = input('letter: ')
>
> >> ... if c
On 8/8/2013 7:41 AM, Chris Angelico wrote:
On Thu, Aug 8, 2013 at 7:20 AM, wrote:
def z2():
... letters = 'abc'
... while True:
... c = input('letter: ')
... if c not in letters:
... print('end, fin, Schluss')
... break
... else:
...
On Thu, Aug 8, 2013 at 7:20 AM, wrote:
def z2():
> ... letters = 'abc'
> ... while True:
> ... c = input('letter: ')
> ... if c not in letters:
> ... print('end, fin, Schluss')
> ... break
> ... else:
> ... print('do stuff')
Le mercredi 7 août 2013 10:17:21 UTC+2, eschne...@comcast.net a écrit :
> I'm trying to create an option for the program to repeat if the user types
> 'y' or 'yes', using true and false values, or otherwise end the program. If
> anyone could explain to me how to get this code working, I'd appreci
On 08/07/2013 01:17 AM, eschneide...@comcast.net wrote:
I'm trying to create an option for the program to repeat if the user types 'y'
or 'yes', using true and false values, or otherwise end the program. If anyone
could explain to me how to get this code working, I'd appreciate it.
letters='ab
eschneide...@comcast.net wrote:
> What I wanted to happen is when the user typed something other than 'y' or
> 'yes' after being asked 'go again?', the batman==False line would cause the
> program to stop asking anything and say 'this is the end'. Instead, what is
> happening is that the progra
What I wanted to happen is when the user typed something other than 'y' or
'yes' after being asked 'go again?', the batman==False line would cause the
program to stop asking anything and say 'this is the end'. Instead, what is
happening is that the program just keeps going. I figured that after
On 7 August 2013 09:17, wrote:
> I'm trying to create an option for the program to repeat if the user types
> 'y' or 'yes', using true and false values, or otherwise end the program. If
> anyone could explain to me how to get this code working, I'd appreciate it.
Always tell people what in par
I'm trying to create an option for the program to repeat if the user types 'y'
or 'yes', using true and false values, or otherwise end the program. If anyone
could explain to me how to get this code working, I'd appreciate it.
letters='abcdefghijklmn'
batman=True
def thingy():
print('type le
22 matches
Mail list logo