" Wurzelberechnung " # Eingabe print('Eingabe des Radikanden:') a = float (input('a = ')) # Die Iteration bricht ab, sobald der Abstand # zweier aufeinanderfolgender Iterationen kleiner als d wird print('Eingabe Fehlerschranke d:') d = float (input('d = ')) print() # Verarbeitung und Ausgabe condition = True # Initialisierung der Bedingung x = a # Startwert; alternativ: x = 1 while condition: z = x x = 0.5*(x + a/x) y = x print(x) condition = (abs(y - z) >= d)