/**
 * This function checks if the given transaction type will cause the accountant's balance to go below zero.
 * The transaction can be either a deposit or a withdrawal.
 * Returns true if the transaction is safe, otherwise false.
 */
fun checkBalance(accountBalance: Float, transactionType: String): Boolean {

    return when {
        transactionType == "withdrawal" && accountBalance <= 0 -> false
        transactionType == "deposit" && accountBalance < 0 -> false
        else -> true
    }
}
/**
 * This function checks if the given transaction type will cause the accountant's balance to go below zero.
 * The transaction can be either a deposit or a withdrawal.
 * Returns true if the transaction is safe, otherwise false.
 */
fun checkBalance(accountBalance: Float, transactionType: String): Boolean {
/**
 * This function checks if the given transaction type will cause the accountant's balance to go below zero.
 * The transaction can be either a deposit or a withdrawal.
 * Returns true if the transaction is safe, otherwise false.
 */
fun checkBalance(accountBalance: Float, transactionType: String): Boolean {

    return when {
        transactionType == "withdrawal" && accountBalance <= 0 -> false
        transactionType == "deposit" && accountBalance < 0 -> false
        else -> true
    }
}