May-23-2019, 03:22 PM
1 2 3 4 5 6 7 8 9 10 |
colours = [] while repeat = True colours.append( input ( 'Please enter a favourite color:' )) answer = input ( 'Would you like to add another favourite color? (Y/N)' ) if answer = "N" or "n" : repeat = False else : print ( "More colours!" ) print ( "So your favourite colours are:" ) print (colours) |
I tried parentheses "while(repeat = True)" but that didn't work either.
I've been learning from a no starch press book (Python Crash Course) but this isn't from the book. It's more free-form so there's not much I can do at this point except ask for help.