132. Python Program to Find the Area and Perimeter Using a Function
EasyArguments
Overview
Pass two arguments into a function, in the right order.
Problem Statement
Write a function show_rectangle(length, width) that prints the area and the perimeter of a rectangle, like this for a length of 5 and a width of 4:
Area: 20
Perimeter: 18
Then read the length and the width (whole numbers, one per line) and call the function with them.
Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.
Input
One value per line, in this order: the length, then the width. Example:
5
4
Output
The output for that example:
Area: 20
Perimeter: 18
The tests try 3 different inputs.