Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. import random
  2. dibujo = ['''
  3.  
  4. +---+
  5. | |
  6. |
  7. |
  8. |
  9. |
  10. =========''', '''
  11.  
  12. +---+
  13. | |
  14. O |
  15. |
  16. |
  17. |
  18. =========''', '''
  19.  
  20. +---+
  21. | |
  22. O |
  23. | |
  24. |
  25. |
  26. =========''', '''
  27.  
  28. +---+
  29. | |
  30. O |
  31. /| |
  32. |
  33. |
  34. =========''', '''
  35.  
  36. +---+
  37. | |
  38. O |
  39. /|\ |
  40. |
  41. |
  42. =========''', '''
  43.  
  44. +---+
  45. | |
  46. O |
  47. /|\ |
  48. / |
  49. |
  50. =========''', '''
  51.  
  52. +---+
  53. | |
  54. O |
  55. /|\ |
  56. / \ |
  57. |
  58. =========''']
  59.  
  60. palabras = ["Peyorativo","Misantropia","hipofisis","hipotalamo","Ventriculo","esclerosis","necrosis","isquemia","filantropia","Epilepsia"]
  61. pSecreta = palabras [random.randint(0,len(palabras) - 1)]
  62. palabras = pSecreta.lower()
  63. palabra = list(pSecreta)
  64. vacio = "_"*len(pSecreta)
  65. correctas = list(vacio)
  66. errores = 0
  67. perder = False
  68. ganar = False
  69.  
  70. while(ganar == False and perder == False):
  71. print(correctas)
  72. print(pSecreta)
  73. intento = raw_input("Ingresa una letra y averigua si está dentro de la palabra secreta: ")
  74. intento = intento.lower().split()
  75. contador = 0
  76. while (contador < len(palabra)):
  77. if (intento in palabra[contador]):
  78. correctas[contador] = intento
  79. contador = contador + 1
  80. if(intento not in palabra):
  81. print(dibujo[errores])
  82. errores = errores + 1
  83. if (errores == 7):
  84. print ("Perdiste, moriras agonizantemente")
  85. perder = True
  86. if (correctas == palabra):
  87. print(correctas)
  88. print("Eres una chingonería, le atinaste!")
  89. ganar = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement