world_jumble.py

Created by marius-layan

Created on February 05, 2024

1.46 KB

Voici un petit jeu nommé world_jumble. Un mot est affiché dans le désordre et le but est de le remettre dans l’ordre. (vous pouvez toujours vous aider de la liste de mot à la troisième ligne)

BON JEU !


from random import *
from time import sleep
l=["patate","tomate","diplodocus","justice","bureau","pasteque","aventure","consoles","histoire","estomac","baignoire", "parapluie", "sauvage","laitue", "jambon", "langue","stylo","agent","fromage","whisky","billet","laser","joystick","crane","joyeux","cahier","camping","argent","rivage","physique","fromage","alambique","casserole","programme","television","logiciel","avion","gourmandise","instrument","tondeuse","ordinateur","technologie","diffusion","navigation","hasardeux","fondations","artistique","utilisation","imbuvable","legume","innovation","iconique","evidence","invitation","cavite","lampadaire","limonade","bouteille","concours","culture","psychologie","cardiologue","laboratoire","scolaire","rasoir","medicament","perfusion","pansement","forage","aiguille","costume","danser","ombrelle","vetement","sentiment","congelateur","spatule","chandelier","bateau","commandant","paquerette","coquelicot","boutique","fantome","ironique","electricite","ingenieur","infirmiere","biologie","chaussette","confiseries","glacier","bistrot","opticien","elegant","aquatique","piscine","romantique","antiquite","automobile","italienne"]
while True:
  mot,l1=choice(l),[]
  for i in mot:l1.append(i)
  mot1=""
  for i in range(len(mot)):
    a,j=choice(l1),0;mot1+=a
    while a!=l1[j]:j+=1
    del l1[j]
  print(mot1);c=input("mot: ")
  if mot==str(c):print("bien joue !");sleep(0.3)
  else:print("dommage,  reponse: ",mot);sleep(0.5)