3. Talking to the User
Learn Talking to the User through beginner-friendly explanations, working GOCO examples, and their expected output.
3.1 Showing Words on Screen
To print things for the user to see, we use Display. If we want to print and then move to a new line, we use Displaynl.
goco
Display("Hello, ").Displaynl("my friend.").
3.2 Asking for Answers
Sometimes you want the user to type something. You can use Input to capture what they type and keep it in a variable box.
goco
Sentence userName.Display("What is your name: ").Input(userName).Displaynl("Nice to meet you, " + userName).