Recall & Review
beginner
What is Kotlin REPL?
Kotlin REPL is a Read-Eval-Print Loop. It lets you write and run Kotlin code line by line in an interactive way, like chatting with the computer.
Click to reveal answer
beginner
How do you start Kotlin REPL from the command line?
You type
kotlinc and press Enter. This opens the Kotlin REPL where you can type Kotlin code directly.Click to reveal answer
beginner
What is Kotlin script mode used for?
Kotlin script mode lets you write Kotlin code in a file with
.kts extension and run it without compiling. It's good for quick tasks and automation.Click to reveal answer
beginner
How do you run a Kotlin script file named
hello.kts?You run
kotlin hello.kts in the command line. This executes the script without creating a separate program.Click to reveal answer
intermediate
What is the main difference between Kotlin REPL and script mode?
REPL runs code interactively line by line, great for testing ideas quickly. Script mode runs a whole Kotlin file as a script, useful for small programs or automation.
Click to reveal answer
What does REPL stand for in Kotlin?
✗ Incorrect
REPL means Read-Eval-Print Loop, which lets you type code and see results immediately.
Which command starts the Kotlin REPL?
✗ Incorrect
Typing
kotlinc starts the Kotlin REPL for interactive coding.What file extension is used for Kotlin script files?
✗ Incorrect
Kotlin scripts use the
.kts extension.How do you run a Kotlin script file named
test.kts?✗ Incorrect
Use
kotlin test.kts to run a Kotlin script file.Which mode is best for quickly testing small pieces of Kotlin code?
✗ Incorrect
REPL is best for quick, interactive testing of Kotlin code.
Explain how Kotlin REPL helps beginners learn Kotlin.
Think about how typing code line by line and seeing results helps learning.
You got /3 concepts.
Describe the steps to run a Kotlin script file from the command line.
Focus on the file type and the command used.
You got /3 concepts.