samedi 26 août 2017

Print code refuses to work

I have this code in python, and i want to print a text in the color entered by the user can be found in a variable. This is how the code looks like

Counter = 1
While True:
           rainbow="Red,Orange,Yellow,Green,Blue,Indigo,Voilet"
color = input ("Enter your rainbow color;")

This print color code doesn't work even if the condition evaluate to true.

if color.lower () in rainbow:
    Print (color)

if Counter == 4
    break
Counter = Counter +1

Aucun commentaire:

Enregistrer un commentaire