about | help | code help+videos | done | prefs |
hint
Define a function hint(color, secret) that takes two parameters: a string (representing a color) and a list of strings (representing a sequence of colors). The function should: The color xxx IS in the secret sequence of colors.where xxx is the color if it is in the list or The color xxx IS NOT in the secret sequence of colors.if the color is not in the list. hint('red', ['red', 'red', 'yellow', 'yellow', 'black']) → 'The color red IS in the secret sequence of colors.' hint('green', ['red', 'red', 'yellow', 'yellow', 'black']) → 'The color green IS NOT in the secret sequence of colors.' hint('black', ['red', 'red', 'yellow', 'yellow', 'black']) → 'The color black IS in the secret sequence of colors.' ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy