Answers for "python randomly choose 0 or 1"

1

randomly choose between two numbers python

import random
 random.choice([-40, 40])
Posted by: Guest on November-06-2020
2

random 0 or 1 python

from random import choice
choice([True, False])
Posted by: Guest on July-15-2020

Code answers related to "python randomly choose 0 or 1"

Python Answers by Framework

Browse Popular Code Answers by Language