Convert boolean values to strings 'Yes' or 'No'.

时间:2021-07-10 07:23:46

Convert boolean values to strings 'Yes' or 'No'.

Complete the bool_to_word (JavascriptboolToWord ) method.

Given: a boolean value

Return: a 'Yes' string for true and a 'No' string for false

using System;
using System.Linq;

public static class Kata
{
  public static string boolToWord(bool word)
  {
    //TODO
    if(word)
    {
      return "Yes";
    }
    else
    {
      return "No";
    }
  }
}