×

c# · level 1 · unit 4 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

adds more paths to the fork.

Some questions have more than two answers. else if adds another condition to check when the ones above it were false. C# checks from the top down and runs only the first block whose condition is true.

Every gives true or false. < means less than, > more than, <= less than or equal to, >= more than or equal to, and != not equal to.

== and != work on text too, letter by letter. Capitals count, so "Cat" == "cat" is false.

using System;

int temperature = 12;
if (temperature < 5)
{
    Console.WriteLine("Wear a big coat.");
}
else if (temperature < 15)
{
    Console.WriteLine("A jumper will do.");
}

In <= and >= the = always comes second, never first.