voc.py

Created by caucaucybu

Created on October 01, 2023

2.9 KB

Permet de s’entrainer sur du vocabulaire de langue. Pour personnaliser la liste il suffit de remplacer les mots présents par vos mots, en sachant qu’ils doivent être entre “ et “, qu’entre la traduction et le mot il y a : et qu’a la fin de la ligne il faut mettre une virgule. Pour le mode, pas besoin de rentrer une valeur. Si vous rentrer test alors on vous demandera tout les mots présents dans la liste et à la fin vous affichera le score.


anglais={
"ambigu":"ambigous",
"sang-froid":"cold-blooded",
"ruse":"cunning",
"meprisable":"despicable",
"ennuyeux":"dull=boring",
"imparfait":"flawed=imperfect",
"machiavelique":"Machiavellian",
"avide de pouvoir":"power-hungry",
"simple d esprit":"simple-minded",
"trahir, tromper":"to betray",
"rugueux":"rough",
"immoral":"immoral",
"tourmente":"tormented",
"bizarre, etrange":"weird",
"tristement celebre":"notorious",
"negligent":"careless=negligent",
"injuste, inequitable":"unfair",
"sournois":"devious",
"cruaute":"cruelty",
"mal oriente":"misdirected",
"vengeur":"vengeful",
"horrible, affreux":"awful",
"inquietant":"disturbing",
"le mal":"Evil",
"fou":"insane",
"malicieux":"malicious",
"malveillant":"malevolent",
"obsede":"obsessed",
"impitoyable":"merciless",
"lache":"coward",
"indigne de confiance":"untrustworthy",
"sombre":"gloomy",
"diabolique":"diabolical",
"espiegle":"mishievous",
"commettre un mefait":"to commit a misdeed",
"mefait, ecart de conduite":"misdeed",
"redouter":"to dread",
"manipuler":"to manipulate",
"faire couler le sang":"to shed blood",
"avoir du sang sur les mains":"to have blood on one's hands",
"tromper, duper":"to deceive",
"une defaite":"defeat",
"mepriser, detester":"to despise",
"trompeur, fallacieux":"deceptive",
"egoiste":"selfish",
"rancunier":"vindictive",
"reparer une injustice":"to right a wrong",
"qui a bon coeur":"gentle-hearted",
"qui a du charisme":"charismatic",
"parfait":"flawless=perfect",
"sympathique":"likeable",
"se demarquer":"to stand out=to be remarkable",
"soutenir":"to root for=to support",
"venerer, idolatrer":"to workship=to idolise",
"avoir des intentions cachees":"to have an agenda=to pursue a personnal goal",
"le personnage principal":"a protagonist=the main character",
"un role principal":"a lead character=a leading role",
"un personnage type":"a stock character=a stereotypical fictional character",
"decrontacte, detendu":"laid-back=relaxed",
"avoir  des competences, etre competent":"to have skills=to be skillful"
}
element=[]
from random import *
if input("mode: ")!="test":
 # note=[0,0]
  for i in anglais.keys():
#    if input(i+": ")==anglais[i]:
  #    note[0]+=1
   # else:
    element.append(i)
#  print(note)
#  element=[choice(list(anglais.keys())) for i in range(int(input("nombre de mots: ")))]
 # for i in element: print(anglais[i])
#  element = element*2
  while element:
    i= randint(0,len(element)-1)
    print(len(element))
    reponse=input(element[i]+":\n ")
    if reponse and reponse[0]==":":
      exec(reponse.strip(":"))
    elif reponse==anglais[element[i]]:
      del element[i]
    else:
      element.append(element[i])
      if len(anglais[element[i]])>30:
        print(anglais[element[i]].split("=")[0],":")
        print(":",anglais[element[i]].split("=")[1])
      else:
        print(anglais[element[i]])
else:
  note=[0,0]
  for i in anglais.keys():
    if input(i+": ")==anglais[i]:
      note[0]+=1
    note[1]+=1
  print(note)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.