/**
 * This exercise aims to test your understanding of the range function and the functionality of the step parameter. Your task is to complete the code in order to count the number of odd numbers within the given range.
 *
 * @param start The starting point of the range (inclusive).
 * @param stop The ending point of the range (exclusive).
 * @param step The increment or decrement value for each iteration. Defaults to 1.
 * @return The count of odd numbers within the given range (inclusive).
 */
fun countOddNumbers(start: Int, stop: Int, step: Int = 1): Int {

    var count = 0

    for (num in start until stop step step) {
        if (num % 2 != 0) {
            count++
        }
    }

    return count
}
/**
 * This exercise aims to test your understanding of the range function and the functionality of the step parameter. Your task is to complete the code in order to count the number of odd numbers within the given range.
 *
 * @param start The starting point of the range (inclusive).
 * @param stop The ending point of the range (exclusive).
 * @param step The increment or decrement value for each iteration. Defaults to 1.
 * @return The count of odd numbers within the given range (inclusive).
 */
fun countOddNumbers(start: Int, stop: Int, step: Int = 1): Int {
/**
 * This exercise aims to test your understanding of the range function and the functionality of the step parameter. Your task is to complete the code in order to count the number of odd numbers within the given range.
 *
 * @param start The starting point of the range (inclusive).
 * @param stop The ending point of the range (exclusive).
 * @param step The increment or decrement value for each iteration. Defaults to 1.
 * @return The count of odd numbers within the given range (inclusive).
 */
fun countOddNumbers(start: Int, stop: Int, step: Int = 1): Int {

    var count = 0

    for (num in start until stop step step) {
        if (num % 2 != 0) {
            count++
        }
    }

    return count
}