13 lines
393 B
Python
13 lines
393 B
Python
|
import math
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
while True:
|
||
|
try:
|
||
|
input_value = input('Berechne die Quadratwurzel aus: ')
|
||
|
if input_value == 'x':
|
||
|
exit()
|
||
|
value = float(input_value)
|
||
|
print(f'Die Quadratwurzel aus {value} ist {float(math.sqrt(value))}')
|
||
|
except Exception as e:
|
||
|
print(f'Ungültige Eingabe! {e}')
|