Last updated 1 year ago
Can someone please give me a simple example of a Boolean variable.
Hi Yuvi,
A boolean variable can hold the value True or False. Hence an example would be:
playing = True
Once you have created that you can use it in conditional statements
if playing: print("You are playing")
Become a free member to post a comment about this question.