# Title: Simple calculator
# Heading: Python Program to Make a Simple Calculator
# Level: beginner
# Tags: calculator, arithmetic, operators, if elif else
# About: A calculator function that adds, subtracts, multiplies or divides two numbers, with a message instead of an error for division by zero.

def calculate(a, operator, b):
    """The result of a operator b, for + - * and /."""
    if operator == "+":
        return a + b
    elif operator == "-":
        return a - b
    elif operator == "*":
        return a * b
    elif operator == "/":
        if b == 0:
            return "Can't divide by zero"
        return a / b
    else:
        return "Unknown operator: " + operator


print("7 * 6:", calculate(7, "*", 6))
print("7 / 2:", calculate(7, "/", 2))
print("7 / 0:", calculate(7, "/", 0))
