feat: Initial commit
This commit is contained in:
15
Laboratorio9/esercizio3.py
Normal file
15
Laboratorio9/esercizio3.py
Normal file
@@ -0,0 +1,15 @@
|
||||
def play():
|
||||
words = []
|
||||
words.append(input("Inserisci una parola: "))
|
||||
|
||||
while True:
|
||||
print(words)
|
||||
word = input("Inserisci una parola: ")
|
||||
|
||||
if words[-1][-2:] == word[0:2] and word not in words:
|
||||
words.append(word)
|
||||
else:
|
||||
print("Fine dei giochi")
|
||||
return
|
||||
|
||||
play()
|
||||
Reference in New Issue
Block a user