import math
def calculate_square_root():
user_input = input("Enter a number to calculate its square root: ")
try:
# Try to convert the input to a float
number = float(user_input)
if number < 0:
# Handle negative numbers
print("Error: Cannot calculate the square root of a negative number.")
else:
# Calculate and display the square root
square_root = math.sqrt(number)
print(f"The square root of {number} is {square_root}.")
except ValueError:
# Handle non-numeric input
print("Error: Please enter a valid numeric value.")
# Run the function
calculate_square_root()
aW1wb3J0IG1hdGgKCmRlZiBjYWxjdWxhdGVfc3F1YXJlX3Jvb3QoKToKICAgIHVzZXJfaW5wdXQgPSBpbnB1dCgiRW50ZXIgYSBudW1iZXIgdG8gY2FsY3VsYXRlIGl0cyBzcXVhcmUgcm9vdDogIikKICAgIAogICAgdHJ5OgogICAgICAgICMgVHJ5IHRvIGNvbnZlcnQgdGhlIGlucHV0IHRvIGEgZmxvYXQKICAgICAgICBudW1iZXIgPSBmbG9hdCh1c2VyX2lucHV0KQogICAgICAgIAogICAgICAgIGlmIG51bWJlciA8IDA6CiAgICAgICAgICAgICMgSGFuZGxlIG5lZ2F0aXZlIG51bWJlcnMKICAgICAgICAgICAgcHJpbnQoIkVycm9yOiBDYW5ub3QgY2FsY3VsYXRlIHRoZSBzcXVhcmUgcm9vdCBvZiBhIG5lZ2F0aXZlIG51bWJlci4iKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgICMgQ2FsY3VsYXRlIGFuZCBkaXNwbGF5IHRoZSBzcXVhcmUgcm9vdAogICAgICAgICAgICBzcXVhcmVfcm9vdCA9IG1hdGguc3FydChudW1iZXIpCiAgICAgICAgICAgIHByaW50KGYiVGhlIHNxdWFyZSByb290IG9mIHtudW1iZXJ9IGlzIHtzcXVhcmVfcm9vdH0uIikKICAgIAogICAgZXhjZXB0IFZhbHVlRXJyb3I6CiAgICAgICAgIyBIYW5kbGUgbm9uLW51bWVyaWMgaW5wdXQKICAgICAgICBwcmludCgiRXJyb3I6IFBsZWFzZSBlbnRlciBhIHZhbGlkIG51bWVyaWMgdmFsdWUuIikKCiMgUnVuIHRoZSBmdW5jdGlvbgpjYWxjdWxhdGVfc3F1YXJlX3Jvb3QoKQ==