Upload files to "/"
This commit is contained in:
commit
9841335fae
5 changed files with 80 additions and 0 deletions
16
rectangle01.py
Normal file
16
rectangle01.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# 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")
|
Loading…
Add table
Add a link
Reference in a new issue