/**
 * This function takes a list and an index as arguments and returns the element at that index.
 * If the index is negative, it should count from the end of the list.
 * If the index is out of range (greater than or equal to the length of the list or less than negative length), it should return null.
 * If the index is a float, it should be converted to an integer.
 */
fun getElement(lst: List<Any>, index: Number): Any? {

    val idx = if (index is Float) index.toInt() else index.toInt()

    return when {
        idx >= lst.size || idx < -lst.size -> null
        idx >= 0 -> lst[idx]
        else -> lst[lst.size + idx]
    }
}
/**
 * This function takes a list and an index as arguments and returns the element at that index.
 * If the index is negative, it should count from the end of the list.
 * If the index is out of range (greater than or equal to the length of the list or less than negative length), it should return null.
 * If the index is a float, it should be converted to an integer.
 */
fun getElement(lst: List<Any>, index: Number): Any? {
/**
 * This function takes a list and an index as arguments and returns the element at that index.
 * If the index is negative, it should count from the end of the list.
 * If the index is out of range (greater than or equal to the length of the list or less than negative length), it should return null.
 * If the index is a float, it should be converted to an integer.
 */
fun getElement(lst: List<Any>, index: Number): Any? {

    val idx = if (index is Float) index.toInt() else index.toInt()

    return when {
        idx >= lst.size || idx < -lst.size -> null
        idx >= 0 -> lst[idx]
        else -> lst[lst.size + idx]
    }
}