Challenge: Rectangle Calculator

Lab Python Beginner 10 points

Read the length and width of a rectangle and print its area and perimeter.

Area = length × width. Perimeter = 2 × (length + width).

Input

Line 1: the length. Line 2: the width. Both are whole numbers.

Output

Area: <area>
Perimeter: <perimeter>

Example

Input

5
3

Output

Area: 15
Perimeter: 16
Sample input available Sample output available
Editor
Python

Hints

Convert both inputs with int().

Brackets matter: 2 * (length + width).

Solution explanation

Read both numbers with int(input()), then use brackets so the sum happens before multiplying by 2.

Show solution
length = int(input())
width = int(input())
print("Area:", length * width)
print("Perimeter:", 2 * (length + width))
Output
Answer
HOME LEARN COMMUNITY DASHBOARD