python_exercises/thinkcspy/Chapter-2-Exercises/Python-Files/problem9.py

13 lines
307 B
Python
Raw Normal View History

# Runestone.Academy thinkcspy course
# Chapter 2
# Problem 9
width = input('What is the width of the rectangle?')
w = int(width)
height = input('What is the height of the rectangle?')
h = int(height)
area = w*h
print('The area of the rectangle with a width of', w, 'and a height of', h, 'is', area, '.')