Jul-16-2022, 02:44 PM
Pages: 1 2
Jul-17-2022, 04:55 AM
I would keep the word chain to report at the end of the game, or to compute a score.
words = [input('enter a country name: ')] while True: word = input('enter a country name starts with the last letter of previous country name: ') if word and word[0].lower() == words[-1][-1].lower(): words.append(word) else: break print(f"So sorry, The first letter of {word} does not match the last letter of {words[-1]}.") print(f"Your word chain {words}")
Pages: 1 2