OUTPUT and INPUT
Contents
OUTPUT and INPUT#
OUTPUT displays output to your console#
// OUTPUT {value}
// OUTPUT {value1}, {value2}, ...
OUTPUT "Hello world"
Enclose strings in double quotes#
OUTPUT "Hello world double quotes"
Getting information from the user with INPUT#
OUTPUT "Please enter your name: "
// INPUT {identifier}
INPUT Name
OUTPUT "Name is ", Name
Printing blank lines can improve readability#
OUTPUT "Hello world" OUTPUT "" OUTPUT "Did you see that blank line?"
Debugging with OUTPUT#
OUTPUT "Adding numbers" X <- 42 + 206 OUTPUT "Performing division" Y <- X / 0 OUTPUT "Math complete"
Exercises#
Exercise
Write a statement to display the line.
Gorillas are the largest living primates.
// Click 'edit' button to input your code.