Skip to content

Instantly share code, notes, and snippets.

@corlaez
Created May 18, 2022 02:10
Show Gist options
  • Save corlaez/51d3a067730134a44f02f18a41b06e42 to your computer and use it in GitHub Desktop.
Save corlaez/51d3a067730134a44f02f18a41b06e42 to your computer and use it in GitHub Desktop.
Self Study Flashcard CLI
val chapter1 = mapOf(
"2 + 2" to "4",
"0 + 2" to "2",
)
val chapters = chapter1// + chapter2 + chapter3
fun main() {
while (true) {
val shuffledQuestions = chapters.keys.shuffled()
shuffledQuestions.forEach { question ->
println("Question: $question")
readln()
val answer = chapters[question]
println("Answer: $answer")
}
println("Congrats, you answered all questions. Shuffling questions again!")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment