Assemble the code to calculate the perimeter of a rectangle.
Ontario Mathematics Grade 4 Curriculum by Wayne Loo, TDSB Hybrid Teacher Digital Learning Coach