The contains function is used to check whether a range contains a specific element:
if(evenRange.contains(2)) {
println("Found")
}
if(oddRange.contains(3)) {
println("Found")
}
This code checks whether the range of even numbers contains the element 2 and whether the range of odd numbers contains the element 3.