input()
The input() built-in function reads a line of text from the user via standard input (stdin). Useful for interactive programs and user prompts.
Syntax
input() // Read without prompt
input("message") // Show message, then readBasic usage
let name = input("Enter your name: ");
print("Hello,", name);Interactive example
class Calculator {
print("Simple Calculator");
// input() returns a string — int()/float() convert it (v0.1.5+)
let a = float(input("Enter first number: "));
let b = float(input("Enter second number: "));
print("Sum:", a + b);
}Without prompt
Call input() without arguments to read silently:
let secret = input();
print("You typed:", secret);Return value
Always returns a string. The trailing newline is stripped. Convert to numbers with int() or float() (v0.1.5+).