Python language prompt for the dims in mm of a of paper LxW
Python language: prompt for the dims in mm of a of paper (LxW). Your program should then calculate and output the perimeter of the paper in mm.
Solution
# Enter the dimension of paper
length_of_paper = input(\'Enter length of paper in mm= \')
width_of_paper = input(\'Enter width of paper in mm= \')
# Calculate perimeter
perimeter = float(length_of_paper) + float(length_of_paper) + float(width_of_paper) + float(width_of_paper)
# Display the result
print(\'The perimeter of paper in mm of dimension {0} and {1} is {2}\'.format(length_of_paper, width_of_paper, perimeter))
