Skip to content

coinToBool (Python function)

Diego Ramirez edited this page May 11, 2021 · 2 revisions

The coinToBool() function

It is similar to coinToBinary() (it is also defined on aleat3.constructor), but instead of giving back a 1 or a 0, it returns True or False. It follows a similar syntax of coinToBinary():

  • "Head": Return True.
  • "Tails": Return False.

It is equivalent to:

def coinToBool(output):
    if output == "Head":
        return 1
    elif output == "Tails":
       return 0
    else:
        return None

Use this wiki to find a wide and free description of some terms for this package: aleat3. Hope you'll enjoy it! If you want, sign in and create a wiki page now!

🛠️ with ❤️ by Diego Ramirez.

Clone this wiki locally