Course of Raku / Essentials / Variables and data types essentials / Strings / Exercises
Hello, Interpolation!
Problem
OK, let us greet a person once again. But this time try using string
interpolation. Ask the person to enter their name, then print a greeting
that also tells them how many letters their name has. Use code
interpolation — the { } form — to compute the length right
inside the string.
Example
If you run the program, you get a prompt:
$ raku hello-interpolation.raku
What is your name? Raku
Hello, Raku! Your name has 4 letters.Solution
Course navigation
← Solution: Hello, Concatenation! | Solution: Hello, Interpolation! →
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська