/**
 * This function calculates the acceleration of an object using the formula:
 * acceleration = (change in velocity) / (change in time)
 */
fun calculateAcceleration(velocity: Double, time: Double) {

    // Prompt the engineer to enter the current velocity
    print("Enter the current velocity of the object (in m/s): ")
    val currentVelocity = readLine()!!.toDouble()

    // Prompt the engineer to enter the current time
    print("Enter the current time (in seconds): ")
    val currentTime = readLine()!!.toDouble()

    // Calculate the change in velocity
    val deltaVelocity = currentVelocity - velocity

    // Calculate the change in time
    val deltaTime = currentTime - time

    // Calculate the acceleration
    val acceleration = deltaVelocity / deltaTime

    // Check if the acceleration is within a certain range
    if (acceleration in -10.0..10.0) {
        println("The object is experiencing a moderate acceleration of $acceleration m/s^2.")
    } else if (acceleration < -10) {
        println("The object is experiencing a strong deceleration of $acceleration m/s^2.")
    } else {
        println("The object is experiencing an acceleration of $acceleration m/s^2.")
    }
}
/**
 * This function calculates the acceleration of an object using the formula:
 * acceleration = (change in velocity) / (change in time)
 */
fun calculateAcceleration(velocity: Double, time: Double) {
/**
 * This function calculates the acceleration of an object using the formula:
 * acceleration = (change in velocity) / (change in time)
 */
fun calculateAcceleration(velocity: Double, time: Double) {

    // Prompt the engineer to enter the current velocity
    print("Enter the current velocity of the object (in m/s): ")
    val currentVelocity = readLine()!!.toDouble()

    // Prompt the engineer to enter the current time
    print("Enter the current time (in seconds): ")
    val currentTime = readLine()!!.toDouble()

    // Calculate the change in velocity
    val deltaVelocity = currentVelocity - velocity

    // Calculate the change in time
    val deltaTime = currentTime - time

    // Calculate the acceleration
    val acceleration = deltaVelocity / deltaTime

    // Check if the acceleration is within a certain range
    if (acceleration in -10.0..10.0) {
        println("The object is experiencing a moderate acceleration of $acceleration m/s^2.")
    } else if (acceleration < -10) {
        println("The object is experiencing a strong deceleration of $acceleration m/s^2.")
    } else {
        println("The object is experiencing an acceleration of $acceleration m/s^2.")
    }
}