#!/usr/bin/python3
import sys

# Program: rectangle-volume.py
# Objective: Calculate the volume of a rectanglar solid. Check for numeric error on length.
# Revisions
#           Specify the type of the error as ValueError and print the error type.
#           Added same to width.
# Edward Bigos


def getFloatValue(message):
    try:
        fValue = float(input(message + " "))
    except ValueError as error:
        print("Error: ",error)
        print("You have entered an invalid value. The input must be a number.")
        sys.exit(-1)
    return fValue


length = getFloatValue("Enter a value for length   ")
width  =  getFloatValue("Enter a value for width   ")
height =  getFloatValue("Enter a value for height  ")


area = length * width * height

print(f"The volume of the rectanglar solid is {area:.1f}")
