[Tutor] newton's square root formula

Alan Gauld alan.gauld at btinternet.com
Tue Feb 3 09:39:15 CET 2009


"WM." <wferguson1 at socal.rr.com> wrote 

># program to find square root
> square = float(raw_input ("Please enter a number to be rooted, "))
> guess = input("Please guess at the root, ")

Actually, I meant you should use raw_input here too...
input() is considered insecure and not recommended. 
(In Python v3 it has been removed from the language 
and raw_input renamed to input.)

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Tutor mailing list