voici un code python: #!/usr/bin/python2.7# -*-
voici un code python:
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
from time import time
from random import randrange
import os
listemots = ["peach","cheat","ABBABBAAAABB","link","ganondorf","lara","clark","tyrande","furion","thrall","azerty","nintendo","mario","mushroom","pokémon"]
def randmot(ll):
mot=ll[randrange(len(ll))]
print "Tapez : "+mot
b=""
while b != mot:
b=raw_input(">")
if b != mot:
print "ERREUR !!!! Recommence vite !"
while 1:
os.system("clear")
print ":!: CHEAT CODE SHELL :!:"
print "Tapez les 12 mots le plus"
print "rapidement possible, sans faute !"
a=raw_input(" Appuyez sur entrée pour lancer un partie !")
deb=time()
for i in range(12):
randmot(listemots)
fin=time()
print "\nTemps : ",fin-deb
a = raw_input("Appuyez sur entrée pour finir et effacer votre score")