Chevron Left Icon
LOLCODE YARNs (Strings)
Lesson 1 of 2
Chevron Right Icon
  1. 1

    LOLCODE allows us to combine, or concatenate, multiple strings together by using the […] and […] keywords. For example, if the code below is executed: […] The terminal will output: …

  2. 2

    For the case of […] ing together strings and variables, LOLCODE supports a popular shortcut called string interpolation. Interpolation here refers to placing variables within strings in an eas…

  3. 3

    Most programming languages have some way of embedding specialized characters in strings that need to be presented in an unusual way. For example, “newline” characters (often represented by […] )…

  4. 4

    Fun fact: Unicode is the standard for how strings are stored and displayed across systems. It’s maintained by the Unicode Consortium, a non-profit organization with responsibilities ranging…

  1. 1

    LOLCODE has 5 basic types of variables: - […] : not yet given a type - […] : integers (whole numbers) - […] : floats (decimal numbers) - […] : string (text) - […] : booleans ( […]…

  2. 2

    LOLCODE allows converting a variable to a different types, such as from a […] (float) to a […] (integer), using the […] command. It goes on a line between a variable’s name and a new …

  3. 3

    LOLCODE also allows converting string types, or […] s, to the two numeric types. The syntax is the same: given a variable name, follow it with […] and the numeric type to convert to. Conver…

  4. 4

    Traditional arithmetic operations are supported on numeric types in LOLCODE: […] Let’s start with the two most basic: * […] : Creates the sum of […] and […] (equivalent to […] …

  5. 5

    Similarly, LOLCODE supports equivalents of the […] and […] operators: […] These follow the same rules as adding or subtracting: if either is already a […] , the result is too; othe…

  6. 6

    You’ve seen that when dividing two integer numbers that don’t fit evenly, some amount will be left out. That amount, called the remainder, can be directly retrieved by the modulo operation. Mo…

  7. 7

    Some languages use a native […] object for advanced operations on numbers. LOLCODE doesn’t have an advanced mathematics object. Still, it does support two of the more common math functions fro…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo