likereto84 likereto84
  • 11-02-2021
  • Computers and Technology
contestada

Write a program that calculates the area & perimeter of a rectangle, where
the values for width and length are given by the users.

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 16-02-2021

Answer:

In Python:

Length = float(input("Length: "))

Width = float(input("Width: "))

Area = Length * Width

Perimeter = 2*(Length + Width)

print(Area)

print(Perimeter)

Explanation:

This gets the length from the user

Length = float(input("Length: "))

This gets the width from the user

Width = float(input("Width: "))

This calculates the area

Area = Length * Width

This calculates the perimeter

Perimeter = 2*(Length + Width)

This prints the area

print(Area)

This prints the perimeter

print(Perimeter)

Answer Link

Otras preguntas

The same amount of ____ that existed before the change of state exists after the change of state.
Can someone help me? I’ll reward points + brainalist
Marcy pulls a backpack on a wheels down the 100m hall. The 60N force is applied at an angle of 30° above the horizontal. How much work is done by Marcy?
Which of the following functions is graphed below ?
Calculate how much work is done when a force of 1600 N pulls a car through a distance of 40 m in the direction of the force.
what is 7/9 x 5 2/5 as a fraction
What was the Louisiana Purchase ? How was the country changed by it ?
6) Two numbers are in the ratio 2:5. If 1 pointthe sum of the numbers is 70, thenumbers are *O 10 and 6060 and 1020 and 50DES50 and 20WIPE​
what is the square root of 16 ​
How did you call the Europe to action?