elis aeris wrote:
> for x in xrange (20, 0):
> print x
> but what if I need the for loop to go from a big number to a small number?
Just give a step value:
for x in xrange(20, 0, -1):
print x
Kent
___
Tutor maillist - Tutor@python.org
http://
i am not sure if I am still in the mailing list of tutor@python.org so
please use reply all to send me a email directly please!
x = 0
y = 0
for x in xrange (20, 0):
print x
this doesn't work because it goes from a big number to a small number, which
does nothing
but what if I need the
Damian Archer wrote:
> I have written what i see as a pretty decent script to resolve this
> question:
>
> Write an improved version of the Chaos program from Chapter 1 that
> allows a user to input two initial
> values and the number of iterations and then prints a nicely formatted
> table showin
Damian Archer wrote:
> # User inputs numbers to compare, z is for the index counter
> x = input("Enter a number between 1 and 0: ")
> y = input("Enter a second number between 1 and 0: ")
We generally discourage the use of input(), it is (arguably) a security
hole -
http://www.wellho.n
I'll throw in a couple of ideas, but I won't pretend to be an expert. ;-)
>I have written what i see as a pretty decent script to resolve this
> question:
>
> Write an improved version of the Chaos program from Chapter 1 that allows
> a
> user to input two initial
> values and the number of iter
I have written what i see as a pretty decent script to resolve this
question:
Write an improved version of the Chaos program from Chapter 1 that allows a
user to input two initial
values and the number of iterations and then prints a nicely formatted table
showing how the values
change over time.