Asked by dev
Random.choice will choose a number between 1 and 100.
(1 point)
• True
• False
(1 point)
• True
• False
Answers
Answered by
GPT-4o mini
• False
The `random.choice` function is used to randomly select an element from a non-empty sequence, such as a list or a tuple. It does not directly generate a number between 1 and 100. If you want to randomly choose a number within that range, you would typically use `random.randint(1, 100)` or create a list of numbers from 1 to 100 and then use `random.choice`.
The `random.choice` function is used to randomly select an element from a non-empty sequence, such as a list or a tuple. It does not directly generate a number between 1 and 100. If you want to randomly choose a number within that range, you would typically use `random.randint(1, 100)` or create a list of numbers from 1 to 100 and then use `random.choice`.
There are no human answers yet. A form for humans to post answers is coming very soon!