/**
 * A code completion exercise for an Economist to calculate the taxable income.
 *
 * The function takes two arguments: income and expenses. It should calculate the taxable income
 * by subtracting the expenses from the income. However, there are specific conditions to consider:
 *
 * - If the income is less than or equal to 0, return 0.
 * - If the income is greater than 0 but less than or equal to 10000, return the income.
 * - If the income is greater than 10000, subtract the expenses from the income and return the result.
 *
 * To complete this exercise, replace the '____" with appropriate code.
 *
 * @param income The income amount.
 * @param expenses The expenses amount.
 * @return The taxable income.
 */
fun calculateTax(income: Double, expenses: Double): Double {

    return when {
        income <= 0 -> 0.0
        income > 0 && income <= 10000 -> income
        else -> income - expenses
    }
}
/**
 * A code completion exercise for an Economist to calculate the taxable income.
 *
 * The function takes two arguments: income and expenses. It should calculate the taxable income
 * by subtracting the expenses from the income. However, there are specific conditions to consider:
 *
 * - If the income is less than or equal to 0, return 0.
 * - If the income is greater than 0 but less than or equal to 10000, return the income.
 * - If the income is greater than 10000, subtract the expenses from the income and return the result.
 *
 * To complete this exercise, replace the '____" with appropriate code.
 *
 * @param income The income amount.
 * @param expenses The expenses amount.
 * @return The taxable income.
 */
fun calculateTax(income: Double, expenses: Double): Double {
/**
 * A code completion exercise for an Economist to calculate the taxable income.
 *
 * The function takes two arguments: income and expenses. It should calculate the taxable income
 * by subtracting the expenses from the income. However, there are specific conditions to consider:
 *
 * - If the income is less than or equal to 0, return 0.
 * - If the income is greater than 0 but less than or equal to 10000, return the income.
 * - If the income is greater than 10000, subtract the expenses from the income and return the result.
 *
 * To complete this exercise, replace the '____" with appropriate code.
 *
 * @param income The income amount.
 * @param expenses The expenses amount.
 * @return The taxable income.
 */
fun calculateTax(income: Double, expenses: Double): Double {

    return when {
        income <= 0 -> 0.0
        income > 0 && income <= 10000 -> income
        else -> income - expenses
    }
}