print( """ \tWelcome to the Babylonian Method This program will generate five steps of Heron's method for a number S that you will have to enter. Heron's method generates better and better approximations for the square root of S. """) S = float(input('Please input the value of S: ')) appr = S/2 appr = 0.5*(appr + S/appr) print('My guess now is', appr) appr = 0.5*(appr + S/appr) print('My guess now is', appr) appr = 0.5*(appr + S/appr) print('My guess now is', appr) appr = 0.5*(appr + S/appr) print('My guess now is', appr) appr = 0.5*(appr + S/appr) print('My final guess is', appr) error = abs(S**0.5-appr)/S**0.5 print('The error is ', error*100,'%')