Chapter 4

Working with Words

IN THIS CHAPTER

check Coding text-based information to appear onscreen

check Accepting text input

check Combining text input and other text

check Creating a simple Mad Libs game

This chapter guides you through a simple but fundamental task in coding — placing text-based information onscreen. Whether you and your coder are building an app, constructing a webpage, or coding some other type of computer program, you need to show information, instructions, or messages onscreen to your user. This information may be text, symbols, or numbers presented in human language, to allow communication between people and computers.

The first program that almost every new coder writes is one that displays the words, “Hello world!” It’s a good way to get started as it takes little time to write such a program — a program that provides immediate gratification with its welcoming message. So say “Hello world!” (and a few other things) as you begin coding communications to display text.

Communicating with Text

On or off the computer, information and conversations use alphanumeric text and symbols ...

Get Helping Kids with Coding For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.