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.net/mouth/956_Python-security-trouble-with-input.html
and a rather contentious discussion on this very list -
http://mail.python.org/pipermail/tutor/2007-August/056328.html
- and it doesn't validate the input. A better way to write this would be

     x = float(raw_input("Enter a number between 1 and 0: "))
     y = float(raw_input("Enter a second number between 1 and 0: "))

which is safer and guarantees that x and y are floating point numbers.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to