Answer:
try this
def sqrt(n):
 approx = n / 2.0
 better = (approx + n/approx)/2.0
 while better != approx:
 print (better)
 approx = better
 better = (approx + n/approx)/2.0
 return approx
print (sqrt(25))
def checkout():
 total = 0
 count = 0
 moreitems = True
 while moreitems:
 price = float(input('Enter price of item (0 when done): '))
 if price != 0:
 count = count + 1
 total = total + price
 print('Subtotal: ${:.2f}'.format(total))
 else:
 moreitems = False
 average = total / count
 print("Total items:", count)
 print("Total price: ${:.2f}".format(total))
 print("Average price: ${:.2f}".format(average))