Professional Documents
Culture Documents
Текстовый документ
Текстовый документ
def functionToCreateArray():
mainList = []
temporaryList = []
while True:
if len(mainList) == 3024:
break
x = str(random.randint(1,9))
temporaryList.append(x)
if len(temporaryList) == 4:
number = int(temporaryList[0] + temporaryList[1] + temporaryList[2] +
temporaryList[3])
checkerOfListHaveOnlyAllowNumbers =
(temporaryList.count(temporaryList[0]) == 1 and
temporaryList.count(temporaryList[1]) == 1 and
temporaryList.count(temporaryList[2]) == 1 and
temporaryList.count(temporaryList[3]) == 1)
temporaryList = []
return mainList
mainListOfNumbers = functionToCreateArray()
def main():
"""Function for finding the number that the user has guessed"""
global mainListOfNumbers
listWhisresoutsOfInput = []
listMainNew = []
while True:
mainListOfNumbers = listMainNew
listMainNew = []
else :
mainListOfNumbers.remove(number)
if __name__ == "__main__":
main()