/**
 * This function calculates the change in velocity for a spacecraft
 * given the acceleration, fuel mass, and time.
 *
 * @param acceleration the acceleration of the spacecraft in m/s^2
 * @param fuelMass the mass of the fuel used in kilograms
 * @param time the time interval in seconds
 * @return the change in velocity in m/s
 */
fun calculateVelocityChange(acceleration: Float, fuelMass: Float, time: Float): Float {

    // Your task is to complete the code below using ternary operator
    // and addition assignment operator to calculate the change in velocity

    var velocityChange = 0f

    velocityChange = if (acceleration < 0) {
        0f
    } else if (fuelMass <= 0) {
        acceleration * time
    } else {
        acceleration * time + if (acceleration >= 10) fuelMass else 0f
    }

    return velocityChange
}
/**
 * This function calculates the change in velocity for a spacecraft
 * given the acceleration, fuel mass, and time.
 *
 * @param acceleration the acceleration of the spacecraft in m/s^2
 * @param fuelMass the mass of the fuel used in kilograms
 * @param time the time interval in seconds
 * @return the change in velocity in m/s
 */
fun calculateVelocityChange(acceleration: Float, fuelMass: Float, time: Float): Float {
/**
 * This function calculates the change in velocity for a spacecraft
 * given the acceleration, fuel mass, and time.
 *
 * @param acceleration the acceleration of the spacecraft in m/s^2
 * @param fuelMass the mass of the fuel used in kilograms
 * @param time the time interval in seconds
 * @return the change in velocity in m/s
 */
fun calculateVelocityChange(acceleration: Float, fuelMass: Float, time: Float): Float {

    // Your task is to complete the code below using ternary operator
    // and addition assignment operator to calculate the change in velocity

    var velocityChange = 0f

    velocityChange = if (acceleration < 0) {
        0f
    } else if (fuelMass <= 0) {
        acceleration * time
    } else {
        acceleration * time + if (acceleration >= 10) fuelMass else 0f
    }

    return velocityChange
}