def main():
    print("=== Welcome to Mama's Little Function App! ===\n")

    prompt = "Enter a real value for x (or type 'q' to quit): "
    x_str = ""
    while True:
        x_str = input(prompt)
        if x_str != "q":
            try:
                x = float(x_str)
                y = f(x)
                print(f"f({x}) = {y} ==> ", end="")
                ordered_pair(x, y)
            except ValueError:
                print("Invalid input. Please enter a valid real number or 'q' to quit.")
        print()  # blank line for readability
        if x_str == "q":
            break

    print("Thank you for using Mama's Little Function App! Goodbye!")
# end main

def f(x):
    # This is a function that returns a value back to the caller
    print(f"Calculating f({x})...")
    # Add demonstration code here
    m = 3.0  # slope
    b = 2.0  # y-intercept
    return m * x + b
# end f

def ordered_pair(x, y):
    # This is a function that returns nothing (None) — it just performs an action
    print(f"({x}, {y})")
# end ordered_pair

if __name__ == "__main__":
    main()
#end if

# Sample Output:
"""
=== Welcome to Mama's Little Function App! ===

Enter a real value for x (or type 'q' to quit): 2
Calculating f(2.0)...
f(2.0) = 8.0 ==> (2.0, 8.0)

Enter a real value for x (or type 'q' to quit): -3
Calculating f(-3.0)...
f(-3.0) = -7.0 ==> (-3.0, -7.0)

Enter a real value for x (or type 'q' to quit): 2.5
Calculating f(2.5)...
f(2.5) = 9.5 ==> (2.5, 9.5)

Enter a real value for x (or type 'q' to quit): eight 
Invalid input. Please enter a valid real number or 'q' to quit.

Enter a real value for x (or type 'q' to quit): Q
Invalid input. Please enter a valid real number or 'q' to quit.

Enter a real value for x (or type 'q' to quit): q

Thank you for using Mama's Little Function App! Goodbye!
"""
