colors ["red""orange""yellow""green""blue"colorselect "while str upper(colorselect!"quit"colorselect input("please type color name"if (colors count(colorselect> )print("the color exists in the list!"elif (str upper(colorselect!"quit")print("the list doesn' contain the color "the example begins by creating list named colors that contains color names it also creates variable named colorselect to hold the name of the color that the user wants to find the application then enters loop where the user is asked for color name that is placed in colorselect as long as this variable doesn' contain the word quitthe application continues loop that requests input whenever the user inputs color namethe application asks the list to count the number of occurrences of that color when the value is equal to or greater than onethe list does contain the color and an appropriate message appears onscreen on the other handwhen the list doesn' contain the requested coloran alternative message appears onscreen notice how this example uses an elif clause to check whether colorselect contains the word quit this technique of including an elif clause ensures that the application doesn' output message when the user wants to quit the application you need to use similar techniques when you create your applications to avoid potential user confusion or even data loss (when the application performs task the user didn' actually request choose runrun module you see python shell window open the application asks you to type color name type blue and press enter you see message telling you that the color does exist in the listas shown in figure - type purple and press enter you see message telling you that the color doesn' existas shown in figure - type quit and press enter the application ends notice that the application displays neither success nor failure message