2024-12-21 20:54:42 -05:00
|
|
|
# Program rectanglar-solid.py
|
|
|
|
|
|
|
|
startUpMessage = '''
|
|
|
|
This program calculates the volume of a rectangular solid.
|
|
|
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
print(startUpMessage)
|
2024-12-21 20:45:14 -05:00
|
|
|
|
2024-12-21 20:49:35 -05:00
|
|
|
length = float(input("Enter a value for the length "))
|
|
|
|
width = float(input("Enter a value for the width "))
|
|
|
|
height = float(input("Enter a value for the height "))
|
2024-12-21 20:45:14 -05:00
|
|
|
|
|
|
|
volumeOfRectangle = length * width * height
|
|
|
|
|
2024-12-21 20:54:42 -05:00
|
|
|
print(f"Volume = {volumeOfRectangle:.1f}")
|
|
|
|
print("\n")
|