Standard Input/Output

In this lesson, you will go over Dart’s standard input and output. You will learn how to accept user input and display output in various formats.

Projects

1. Welcome User

Receive user’s name as input and display Welcome <user's name> as output

2. Two Fer

Ask user to input a name, return a string with the message:

One for {name}, one for me.

Where {name} is the input from the user.

However, if the name is missing, return the string:

One for you, one for me.

Here are some examples:

Name String to return
Ram One for Ram, one for me.
Shyam One for Shyam, one for me.
One for you, one for me.
Alice One for Alice, one for me.

Resources