Oct-25-2018, 11:04 PM
Hi,
I need your help,
I'm a beginner in python and i'm facing a problem with my code . It fails once I add two lines , even if it seems to be correct
herunde both codes :
the successful code
I need your help,
I'm a beginner in python and i'm facing a problem with my code . It fails once I add two lines , even if it seems to be correct
herunde both codes :
the successful code
# -*-coding:Latin-1 -* import os from donnees import * from fonctions import * ScorePlayer = GetPlayerScore(MyScore) print("le score est {} ".format(ScorePlayer)) SplitWord = list() CryptedWord = list() ClairWord = GetHazardWord() SplitWord = list(ClairWord) print(SplitWord) for word in SplitWord: CryptedWord.append('*') print("Le mots a trouve est===================== {} =====================".format(CryptedWord)) while Tries < MaxTries: CarFound = '0' character = input("Merci de saisir un caractere ") for elmnt in SplitWord: if elmnt==character: CarFound = '1' break Tries = Tries + 1 os.system("pause")non successful code
# -*-coding:Latin-1 -* import os from donnees import * from fonctions import * ScorePlayer = GetPlayerScore(MyScore) print("le score est {} ".format(ScorePlayer)) SplitWord = list() CryptedWord = list() ClairWord = GetHazardWord() SplitWord = list(ClairWord) print(SplitWord) for word in SplitWord: CryptedWord.append('*') print("Le mots a trouve est===================== {} =====================".format(CryptedWord)) while Tries < MaxTries: CarFound = '0' character = input("Merci de saisir un caractere ") for elmnt in SplitWord: if elmnt==character: CarFound = '1' break if CarFound =='1': print("OK") Tries = Tries + 1 os.system("pause")Thank you in advance