Libraries - random Flashcards

1
Q

blue, yellow, red

Assign a one of the colors above randomly to the variable “color”

A

import random

color = random.choice([“white”, “yellow”, “purple”, “red”])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly