git_practice/rectangular-solid01.py

18 lines
407 B
Python
Raw Permalink Normal View History

# 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
print(f"Volume = {volumeOfRectangle:.1f}")
print("\n")