Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a class Rectangle with methods to calculate area and perimeter.

Medium

Problem Statement

Create a class Rectangle with methods to calculate area and perimeter.

Sample Input

Length: 10, Width: 5

Sample Output

Area: 50
Perimeter: 30

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Predefined dimensions length = 10 width = 5 # Your logic here
Log in or sign up to run or submit your code.Log inSign up
Input
Length: 10, Width: 5
Expected Output
Area: 50
Perimeter: 30