16 lines
321 B
Python
16 lines
321 B
Python
# Program rectangle01.py
|
|
|
|
startUpMessage = '''
|
|
This program calculates the area of a rectangle.
|
|
|
|
'''
|
|
|
|
print(startUpMessage)
|
|
|
|
length = float(input("Enter a value for the length "))
|
|
width = float(input("Enter a value for the width "))
|
|
|
|
areaOfRectangle = length * width
|
|
|
|
print(f"Area = {areaOfRectangle:.1f}")
|
|
print("\n") |