Boolean to String Conversion

Published by Mubashir Hassan in

Create a function that takes a boolean variable flag and returns it as a string.

Examples

bool_to_string(true) ➞ "true"

bool_to_string(false) ➞ "false"

Notes

  • Don't forget to return the result.
  • If you get stuck on a challenge, find help in the Resources tab.
  • If you're really stuck, unlock solutions in the Solutions tab.
Watch a quick demo on how Edabit works.