Menu
Coddy logo textTech

Recap - Indexed Letters

Part of the Fundamentals section of Coddy's Kotlin journey. Lesson 78 of 93.

challenge icon

Challenge

Medium

Read an ASCII text line. Print each letter in uppercase preceded by its zero-based position and a colon plus space, one letter per line. Ignore digits, spaces and punctuation. If the line contains no letters, print No letters.

Try it yourself

fun main() {
    val text = (readLine() ?: "")
    // Print the indexed letters.
}

All lessons in Fundamentals

Practice on your own: Kotlin playground