Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

consider the following procedure. which inputs will result in y returni…

Question

consider the following procedure.
which inputs will result in y returning 6 after the code is executed? (5 points)
slope(1, 3, 4)
slope(1, 2, 3)
slope(1, 2, 4)
slope(2, 3, 4)

Explanation:

Step1: Test first option

$y = 1*3 + 4 = 7$

Step2: Test second option

$y = 1*2 + 3 = 5$

Step3: Test third option

$y = 1*2 + 4 = 6$

Step4: Test fourth option

$y = 2*3 + 4 = 10$

Answer:

slope(1, 2, 4)