Course of Raku / Essentials

Data type conversion

So far, we have seen a number of data types that Raku supports. Those were different kinds of numbers (integers, rational numbers, and floating-point numbers), strings, and Boolean type. Each data type has its name in the Raku type system.

Str | String of characters Int | Integer number Rat | Rational number Num | Floating-point number Bool | Logical Boolean

There are more data types that Raku understands. We will see them in the further sections of this course.

Exercises

Please do not skip the exercises after this section as they reveal some additional information about the data types of Raku.

Topics in this section

Practice

Complete the quizzes that cover the contents of this section.

Exercises

This section contains 3 exercises. Examine all the topics of this section before doing the coding practice.

  1. True and False numbers
  2. True and False strings
  3. Fractional part

Course navigation

Solution: Digital stairs   |   Introspection with WHAT

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