Course of Raku / Essentials / Scalar variables / Exercises

Greet a person

Problem

Write a program that does the following two actions:

  1. Asks the user for their name.
  2. Prints a message Hello, Name!, where Name is the name that was just entered.

In this program, please use variables.

Example

The expected behaviour of the program is demonstrated below:

$ raku greet-a-person.raku
What is your name? John
Hello, John!

Solution

See the solution

Course navigation

Comments / Embedded comments   |   Strings

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська