In a make task you use the skills you have learned to create a program from scratch. There is no starter code: you begin with an empty editor.
Write a program that calculates the perimeter of a rectangle. The perimeter is the distance all the way around the outside, so it is the width plus the length, doubled.
print followed by
an input() that collects the answer. Convert both answers to whole numbers
and store them in variables.The perimeter is 16
Both measurements are whole numbers, so the perimeter is a whole number too.
Ask the two questions with their own print, exactly as written, in this order:
Enter the width:Enter the length:The questions are part of the checked output, so spelling, capital letters and punctuation count.
Input:
5
3
Output:
Enter the width:
Enter the length:
The perimeter is 16
Input:
147
68
Output:
Enter the width:
Enter the length:
The perimeter is 430
Make sure that you check for the following things:
= for assignment.+ to add, - to subtract, * to
multiply, / to divide with a decimal result, and // to divide and keep
only the whole number part.2 * (width + length) is not the same as 2 * width + length.print is wrapped in str().