liste_mots = []
# Implémentation du mini dictionnaire de mots français
while True:
mot = str(input(""))
if mot == "":
break
else:
liste_mots.append(mot)
'''# Choix aléatoire du mot à deviner par l'ordinateur
taille_liste = len(liste_mots)
mot_à_deviner = str()
import random
i = random.randint(0 , taille_liste) # (Choix d'un nombre qui devient le rang du mot à deviner)
mot_à_deviner = liste_mots[i]
print(mot_à_deviner) # A effacer'''
mot_à_deviner = "retour"
taille_mot = len(mot_à_deviner)
print(f"Jai choisi un mot, il contient {taille_mot} lettres.")
liste_lettres_trouvées = []
occurrence = int()
affichage = list(mot_à_deviner)
while True:
lettre_proposée = str(input("Choisissez une lettre: "))
print(lettre_proposée)
liste_lettres_trouvées.append(lettre_proposée)
if lettre_proposée in mot_à_deviner:
occurrence = mot_à_deviner.count(lettre_proposée)
print(f"{occurrence} {lettre_proposée}")
for i in range(taille_mot):
To embed this project on your website, copy the following code and paste it into your website's HTML: