/**
 * This function calculates the monthly salary for a graphic designer based on the hours worked and job type
 */
fun calculateSalary(hoursWorked: Int, jobType: String): String {

    if (hoursWorked <= 0) {
        return "Invalid number of hours worked"
    }
    if (jobType !in listOf("full-time", "part-time")) {
        return "Invalid job type"
    }

    var monthlySalary = 0

    // Calculate salary for full-time graphic designer
    if (jobType == "full-time") {
        monthlySalary = when {
            hoursWorked <= 160 -> 50 * hoursWorked
            hoursWorked <= 200 -> 8000 + 70 * (hoursWorked - 160)
            else -> 12000 + 90 * (hoursWorked - 200)
        }
    } else {
        // Calculate salary for part-time graphic designer
        monthlySalary = when {
            hoursWorked <= 80 -> 70 * hoursWorked
            hoursWorked <= 120 -> 6000 + 80 * (hoursWorked - 80)
            else -> 10000 + 100 * (hoursWorked - 120)
        }
    }

    return "Monthly salary: $$monthlySalary"
}
/**
 * This function calculates the monthly salary for a graphic designer based on the hours worked and job type
 */
fun calculateSalary(hoursWorked: Int, jobType: String): String {
/**
 * This function calculates the monthly salary for a graphic designer based on the hours worked and job type
 */
fun calculateSalary(hoursWorked: Int, jobType: String): String {

    if (hoursWorked <= 0) {
        return "Invalid number of hours worked"
    }
    if (jobType !in listOf("full-time", "part-time")) {
        return "Invalid job type"
    }

    var monthlySalary = 0

    // Calculate salary for full-time graphic designer
    if (jobType == "full-time") {
        monthlySalary = when {
            hoursWorked <= 160 -> 50 * hoursWorked
            hoursWorked <= 200 -> 8000 + 70 * (hoursWorked - 160)
            else -> 12000 + 90 * (hoursWorked - 200)
        }
    } else {
        // Calculate salary for part-time graphic designer
        monthlySalary = when {
            hoursWorked <= 80 -> 70 * hoursWorked
            hoursWorked <= 120 -> 6000 + 80 * (hoursWorked - 80)
            else -> 10000 + 100 * (hoursWorked - 120)
        }
    }

    return "Monthly salary: $$monthlySalary"
}