Section 1 - Instruction

You've learned how if - else if - else chains let your code choose from multiple options in Swift. Remember, only the first true condition's code block runs, then the rest is skipped.

Engagement Message

Ready to practice making programs with multiple choices?

Section 2 - Practice

Type

Multiple Choice

Practice Question

What will this code print?

A. Hot B. Warm C. Cool D. Cold

Suggested Answers

  • A
  • B - Correct
  • C
  • D
Section 3 - Practice

Type

Fill In The Blanks

Markdown With Blanks

Fill in the blanks to create a grade calculator:

Suggested Answers

  • if
  • else if
  • else if
  • else
  • while
Section 4 - Practice

Type

Sort Into Boxes

Practice Question

Sort these scenarios based on whether they're best suited for if-else if-else chains:

Labels

  • First Box Label: Good for if-else if-else
Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal