# Solution to problem M4S1P2 game = True cont = "y" while game == True: name = input("What is your name ? ") color = input("What is your favorite color ? ") print ("Hi " + name + "! Your favorite color is " + color + ".") while cont == "y": cont = input("Do you want to play again (y/n) ? ") if cont == "n": game = False elif cont == "y": game = True break # What is the purpose of this break else: cont = "y" # What is the purpose of this else?

Επιλέξτε για επιστροφή στο 4.1.2

Τελευταία τροποποίηση: Σάββατο, 14 Απριλίου 2018, 9:36 PM