Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 10.42 KB | None | 0 0
  1. import random, time
  2. ordn = 0
  3. qua = 0
  4. master = ""
  5. wir_eng = ["skulduggery", "jar", "clarsach", "growl", "slugabed", "ledger", "jibe", "audiation", "ply", "muliebrity", "nervous", "dekulakize", "triangulation", "conversely", "pendragon", "carbonado", "pronoia", "haul", "stance", "histrionic", "vamp", "analphabet", "esurient", "rainmaker", "husbandry", "hobbyist", "deglutition", "caressive", "boffin", "gassy", "pipe", "finesse", "koha", "cachexia", "flare", "inexorable", "dehort", "caliginous", "emu", "brumous", "gigot", "pomander", "acquit", "gumption", "banausic", "bounden", "darkly", "blotto", "blooper", "cryptodepression", "puffling", "prescient", "tumultuous", "supine", "dashcam", "trice", "box", "mistletoe", "parse", "oneiromancy", "chilly", "leister", "turntable", "prototype", "sinew", "defervesce", "plaque", "fard", "elevenses", "deperm", "dame", "irregardless", "ohana", "conglomerate", "archetype", "sowl", "loch", "bivious", "mirative", "illustrious", "chatelaine", "battue", "exiguity", "ariose", "remora", "belluine", "borborygm", "marocain", "monopsony", "seasteading", "fruiterer", "hydrophobia", "overproof", "armistice", "heresiarch", "arrowroot", "wendigo", "endmember", "audient", "recension", "amigurumi", "homily", "bloodthirsty", "talaria", "shunt", "fruitless", "patronize", "daft", "corkage", "tattle", "potsherd", "list", "demimonde", "wheelie", "aquaponics", "mickle", "troth", "scour", "main", "ferrule", "acute", "slivovitz", "disrecommend", "plesionym", "wasm", "balconic", "ageful", "supernumerary", "xebec", "apricate", "ruse", "gamboge", "raunchiness", "abase", "utopographer", "cherish", "cybernat", "warrant", "cummerbund", "jumbo", "rantistirion", "nitty", "ostrichism", "necessitate", "colonelcy", "baragouin", "zowerswopped", "aegis", "thrice", "dernier", "lepak", "undercurrent", "rakhi", "endearing", "runway", "badass", "repdigit", "nosegay", "insouciant", "freewheeling", "juvenile", "doofer", "bosomy", "klaxon", "luminary", "unwittingly", "august", "adret", "deadfall", "numinous", "fetial", "sassywood", "mink", "maverick", "forex", "lucre", "prowess", "emoji", "champagne", "regmaglypt", "shrill", "acquis", "faze", "gramarye", "chic", "cirque", "behove", "enormity", "moccasin", "mythos", "tortoni", "abiogenesis", "stonewall", "moiety", "catheter", "fiendishly", "melomaniac", "barcarole", "shrithe", "zongzi"]
  6. wir_rus = ["ростовщичий", "кудлатый", "роялизм", "кубофутуризм", "ротоглотка", "ксенокристалл", "рострум", "ксантома", "рокарий", "волнующий", "горловой", "вносимый", "вливание", "солнцепоклонник", "субантарктический", "противополагать", "просчитать", "экуменистский", "многократный", "норный", "конфирмационный", "опушать", "конфигурировать", "опухнуть", "конфекция", "опустошить", "контрить", "оптимистичность", "контральтовый", "оптимизационный", "конторсия", "опрыснуть", "контаминировать", "опрессовывать", "консультационный", "опреснить", "конспирировать", "оппортунистский", "консонансный", "опоясаться", "консервационный", "опоэтизировать", "коноплёвый", "ополчаться", "кондиционный", "оползать"]
  7. lei = input("""Language: eng/rus
  8. """)
  9. if lei == "eng":
  10.     zu = random.sample(wir_eng, 200)
  11. elif lei == "rus":
  12.     zu = random.sample(wir_rus, 46)
  13. def gem(ordn, qua, lei):
  14.     if lei == "eng":
  15.         if ordn > 199:
  16.             print("You actually have won the game & guessed all the words the author added, go and have some rest... No one is more deserving of a rest.")
  17.         else:
  18.             finished = False
  19.             fe = 0
  20.             anz = "You've guessed"
  21.             gen = ["A-ha!", "Aha!", "Bingo!", "Eureka!", "Exactly!", "Got it!", "That's it!", "Yes!"]
  22.             au = ["Cheers'en!", "Cheerzen!"]
  23.             master = zu[ordn]
  24.             word = list(master)
  25.             length = len(word)
  26.             right = list("_" * length)
  27.             while finished == False:
  28.                 guess = input("Guess a letter! ")
  29.                 if guess not in master:
  30.                     fe += 1
  31.                     print("This letter is not in the word.")
  32.                 for letter in word:
  33.                     if letter == guess:
  34.                         index = word.index(guess)
  35.                         right[index] = guess
  36.                         word[index] = "_"
  37.                         print(random.choice(gen))
  38.                 print(right)
  39.                 if list(master) == right:
  40.                     qua += 1
  41.                     ordn += 1
  42.                     print(anz, master.upper())
  43.                     ac = "But you made a mistake " + str(fe) + " times."
  44.                     if fe >= 26:
  45.                         print(ac, "How come?! You dunno how to play, as a matter of fact!!")
  46.                     elif fe >= 13:
  47.                         print(ac, "It seems too difficult for you, init?")
  48.                     elif fe >= 9:
  49.                         print(ac, "Well, that's OK")
  50.                     elif fe >= 7:
  51.                         print(ac, "That's pretty cool, you're doing it pretty well.")
  52.                     elif fe >= 5:
  53.                         print(ac, "You rock!")
  54.                     elif fe >= 2:
  55.                         print("Are you a native speaker? Only", str(fe), "mistakes.")
  56.                     elif fe == 1:
  57.                         print("You've made 1 mistake...")
  58.                     else:
  59.                         print("It's impossible! No mistakes. How come? Ew, cheater.")
  60.                     if qua < 2:
  61.                         print(anz, str(qua), "word! Try it once more.")
  62.                     else:
  63.                         print(anz, str(qua), "words already! Attaboy :D")
  64.                     quai = input("""Wanna play again? y/n
  65. """)
  66.                     if quai == "n":
  67.                         print(random.choice(au))
  68.                         time.sleep(1)
  69.                         exit()
  70.                     elif quai == "y":
  71.                         print("then...")
  72.                         gem(ordn, qua, lei)
  73.                     else:
  74.                         def sto(au):
  75.                             gr = input("""PRINT EITHER y OR n
  76. """)
  77.                             if gr == "n":
  78.                                 print(random.choice(au))
  79.                                 time.sleep(1)
  80.                                 exit()
  81.                             elif gr == "y":
  82.                                 gem(ordn, qua, lei)
  83.                             else:
  84.                                 sto(au)
  85.  
  86.                         sto(au)
  87.                     finished = True
  88.     elif lei == "rus":
  89.         if ordn > 45:
  90.             print("Все слова отгадал. Пойди отдохни.")
  91.         else:
  92.             finished = False
  93.             fe = 0
  94.             anz = "Ты отгадал"
  95.             gen = ["Бинго!", "Нашёл!", "Точно!", "Вот оно!", "Именно!", "Да!"]
  96.             au = ["Пока, тогда!", "В таком случае, пока!"]
  97.             master = zu[ordn]
  98.             word = list(master)
  99.             length = len(word)
  100.             lent = length * 2 + 1
  101.             right = list("_" * length)
  102.             while finished == False:
  103.                 guess = input("Отгадай букву! ")
  104.                 if guess not in master:
  105.                     fe += 1
  106.                     print("Этой буквы нет в слове.")
  107.                 for letter in word:
  108.                     if letter == guess:
  109.                         index = word.index(guess)
  110.                         right[index] = guess
  111.                         word[index] = "_"
  112.                         print(random.choice(gen))
  113.                 print("×" * lent)
  114.                 righ = " ".join(right)
  115.                 print("|" + righ + "|")
  116.                 print("×" * lent)
  117.                 if list(master) == right:
  118.                     qua += 1
  119.                     ordn += 1
  120.                     print(anz, master.upper())
  121.                     ac = "Сделано ошибок: " + str(fe)
  122.                     if fe >= 26:
  123.                         print(ac, "Непонятно как играть?")
  124.                     elif fe >= 13:
  125.                         print(ac, "Слишком сложно?")
  126.                     elif fe >= 9:
  127.                         print(ac, "Ну, нормально.")
  128.                     elif fe >= 7:
  129.                         print(ac, "Очень неплохо.")
  130.                     elif fe >= 5:
  131.                         print(ac, "Круто!")
  132.                     elif fe >= 2:
  133.                         print("Ты русский, да? Сделано ошибок: ", str(fe))
  134.                     elif fe == 1:
  135.                         print("Всего 1 ошибка...")
  136.                     else:
  137.                         print("Невозможно! Нет ошибок. Как так? Фу, читер.")
  138.                     if qua < 2:
  139.                         print(anz, str(qua), "слово! Попробуй ещё.")
  140.                     else:
  141.                         print(anz, str(qua), "слов уже! Молодец :D")
  142.                     quai = input("""Хочешь сыграть снова? д/н
  143. """)
  144.                     if quai == "н":
  145.                         print(random.choice(au))
  146.                         time.sleep(1)
  147.                         exit()
  148.                     elif quai == "д":
  149.                         print("тогда...")
  150.                         gem(ordn, qua, lei)
  151.                     else:
  152.                         def sto(au):
  153.                             gr = input("""НЕ ТУПИ! НАПИШИ д ИЛИ н
  154. """)
  155.                             if gr == "н":
  156.                                 print(random.choice(au))
  157.                                 time.sleep(1)
  158.                                 exit()
  159.                             elif gr == "д":
  160.                                 gem(ordn, qua, lei)
  161.                             else:
  162.                                 sto(au)
  163.  
  164.                         sto(au)
  165.                     finished = True
  166. gem(ordn, qua, lei)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement