mumber = 23
running = Ture
while running:
guess = int(raw_input('Enter an integer :'))
if guess == number:
print 'congratulations, you guessed it.'
running = False
elif guess < number:
print 'no, it is a little higher than that'
else:
print 'no
i am new guy.
i ask a easy question.
why the first one have"x",the second one doesn't have "x". what is different?
when write "x",when don't write "x".
in my point,the second one don't def variable.
(1)
def func(x):
print 'x is', x
x = 2
print 'Changed local x to', x
x = 50
func(
i am new guy.
i ask a easy question.
why the first one have"x",the second one doesn't have "x". what is different?
when write "x",when don't write "x".
in my point,the second one don't def variable.
(1)
def func(x):
print 'x is', x
x = 2
print 'Changed local x to', x
x = 50
func
the tutor list has been strangely silent for a few days. Anyone know
what has happened? why?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor