Computer Science, asked by AnnieStar, 11 months ago

Write a python program to accept length and width of a rectangle and compute its perimeter and area​

Answers

Answered by HeroicAyush
12

Explanation:

# Python Program to find Perimeter of a Rectangle using length and width

length = float(input('Please Enter the Length of a Triangle: '))

width = float(input('Please Enter the Width of a Triangle: '))

# calculate the perimeter

perimeter = 2 * (length + width)

print("Perimeter of a Rectangle using", length, "and", width, " = ", perimeter)


AbhijithPrakash: Awesome!!
Answered by sriramganesh111
6

Answer:

CODE:

length=float(input('Please Enter the Length of a Triangle: '))

width=float(input('Please Enter the Width of a Triangle: '))

perimeter=2*(length+width)

area=(length*width)

print("preimeter of a rectamgle is",perimeter)

print("preimeter of a rectamgle is",area)

OUTPUT:

Please Enter the Length of a Triangle: 2

Please Enter the Width of a Triangle: 2

preimeter of a rectamgle is 8.0

preimeter of a rectamgle is 4.0

Similar questions