Exercise: Rectangle
- Write a script called basic2_rectangle_input.py that will ask for the sides of a rectangle and print out the area.
- Provide error messages if either of the sides is negative.
python rect.py
Side: 3
Side: 4
The area is 12
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
python rect.py
Side: 3
Side: 4
The area is 12