Question: Consider a function machine that accepts inputs as ordered pairs. Suppose the components of the ordered pairs are natural numbers and the first component is

Consider a function machine that accepts inputs as ordered pairs. Suppose the components of the ordered pairs are natural numbers and the first component is the length of a rectangle and the second is its width. The machine computes the perimeter (the distance around a figure) of the rectangle. Thus, for a rectangle whose length, L, is 3 and whose width, W, is 1, the input is (3,1) and the output is 2*3+2*1, or 8. Complete parts (a) through (c) below.
a. For each of the following inputs, find the corresponding output: (1,10),(5,6),(6,5),(52,52),(x,a).
The output for (1,10) is
The output for (5,6) is
The output for (6,5) is
The output for (52,52) is
The output for (x,a) is
Consider a function machine that accepts inputs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!