fork download
  1. import os
  2. miss=[]
  3. wordHide=[]
  4. wordIs = list(input('Загадайте слово '))
  5. for x in wordIs: wordHide.append('_')
  6. i=0
  7. while i < 7:
  8. try:
  9. os.system('cls')
  10. except:
  11. os.system('clear')
  12. print('')
  13. print('--------')
  14. print('| / |')
  15. if i>=3:
  16. print('|/ _0_')
  17. elif i==2:
  18. print('|/ 0_')
  19. elif i==1:
  20. print('|/ 0 ')
  21. elif i==0:
  22. print('|/ ')
  23. if i>=4:
  24. print('| |')
  25. else:
  26. print('| ')
  27. if i<5:
  28. print('| ')
  29. elif i==5:
  30. print('| / ')
  31. elif i>5:
  32. print('| / \\')
  33. print('|')
  34. print('--------')
  35. print('')
  36. print(' '.join(wordHide))
  37. print('')
  38. print('')
  39. print(','.join(miss))
  40. print('')
  41. print('')
  42. if i==6:
  43. print('Вы проиграли!')
  44. i+=1
  45. else:
  46. a=input('Введите букву ')
  47. a=a[0]
  48. if a not in wordIs:
  49. i+=1
  50. miss.append(a)
  51. else:
  52. for j,e in enumerate(wordIs):
  53. if e == a:
  54. wordHide[j]=a
Runtime error #stdin #stdout #stderr 0.01s 9992KB
stdin
Standard input is empty
stdout
Загадайте слово 
stderr
Traceback (most recent call last):
  File "./prog.py", line 4, in <module>
EOFError: EOF when reading a line