diff --git a/pick-color/main.py b/pick-color/main.py index 4286499..0a2c51b 100644 --- a/pick-color/main.py +++ b/pick-color/main.py @@ -1,11 +1,12 @@ # Color Picker Simulator # Picks a random color from a predefined list -import random +from random import randrange def get_random_color(): # TODO: Return a random color from the list colors = ["Red", "Green", "Blue", "Yellow", "Purple", "Orange"] + print(colors[randrange(5)]) pass def main(): @@ -14,6 +15,6 @@ def main(): while True: input("Press Enter to pick a color (or Ctrl+C to quit)...") # Call the random color function and display the result - + print(get_random_color()) if __name__ == "__main__": main()