fork download
  1. # your code goes here#Создать прогу которая будет выводить список слов в случайном порядке.
  2.  
  3. import random
  4.  
  5. words = ["lolka", "igolka", "mango", "banango", "tyan", "petyan"]
  6.  
  7.  
  8. length = len(words)
  9. count = 0
  10. printed = []
  11.  
  12. while count != length:
  13. word = random.choice(words)
  14. if word in printed:
  15. continue
  16.  
  17.  
  18. else:
  19. print(word)
  20. printed.append(word)
  21. count += 1
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. input('press enter')
  29.  
Runtime error #stdin #stdout #stderr 0.01s 11496KB
stdin
Standard input is empty
stdout
igolka
mango
petyan
lolka
tyan
banango
press enter
stderr
Traceback (most recent call last):
  File "prog.py", line 28, in <module>
EOFError: EOF when reading a line