From 33a59e9a9996a8c1db1632c82c96a2936d024a5a Mon Sep 17 00:00:00 2001 From: Enginneer887766 <70516735+Enginneer887766@users.noreply.github.com> Date: Sat, 20 Sep 2025 10:13:08 +0530 Subject: [PATCH] Completed color_picker --- pick-color/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()