# Hack 2: A function to calculate the y-value for the equation f(x) = 5x + 2
def calculate_y(x):
"""
Calculates the y-value of the function f(x) = 5x + 2.
Args:
x (int or float): The x-value that you plug into the equation.
Returns:
int or float: The y-value corresponding to the x-value.
"""
# Here's the equation: y = 5 * x + 2
y = 5 * x + 2 # Multiply the x-value by 5 and add 2
return y # Return the y-value
# Test the function with some x-values
print(calculate_y(3)) # Output: 17 (When x = 3, y = 5*3 + 2 = 17)
print(calculate_y(0)) # Output: 2 (When x = 0, y = 5*0 + 2 = 2)
print(calculate_y(-2)) # Output: -8 (When x = -2, y = 5*(-2) + 2 = -8)