Exceptions – Solution [0]

def input_side():
    while True:
        raw_input = input("Enter the side of a square in centimeters: ")
        try:
            side = float(raw_input)
        except ValueError:
            print(f"{raw_input} is not a number!")
        else:
            if side <= 0:
                print(f"{raw_input} is a negative number!")
            else:
                break
    return side
side = input_side()
print(f"The perimeter of a square with a side of {side} cm is {side * 4} cm.")
print(f"The area of a square with a side of {side} cm is {side ** 2} cm2.")