Assign a variable solveEquation with a function expression that has three parameters (x, y, and z) and returns the result of evaluating the expression Z-y + 2 * x. 2 /* Your solution poes here */ 4 solveEquation(2, 4, 5.5); // Code will be tested once with values 2, 4, 5.5 and again with values -5, 3, 8

Respuesta :

Answer:

The programming language is not stated;

However, the program written in Python is as follows

def solveEquation(x,y,z):

     result = z - y + 2 * x

     print(result)

x = float(input("x = "))

y = float(input("y = "))

z = float(input("z = "))

print(solveEquation(x,y,z))

Explanation:

This line defines the function solveEquation

def solveEquation(x,y,z):

This line calculates the expression in the question

     result = z - y + 2 * x

This line returns the result of the above expression

     print(result)

The next three lines prompts user for x, y and z

x = float(input("x = "))

y = float(input("y = "))

z = float(input("z = "))

This line prints the result of the expression

print(solveEquation(x,y,z))