Advertisement
nikitttttta

Untitled

May 5th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. from collections import Counter
  2.  
  3. goloca = []
  4. liudi = []
  5.  
  6. def wwod(liudi, goloca):
  7. while True:
  8. wwodimoe = input("Введите имя: ")
  9.  
  10. if wwodimoe == "admin":
  11. while True:
  12. anmin_wwod_golosa = input("За кого голос: ")
  13. if anmin_wwod_golosa == "stop":
  14. break
  15.  
  16. else:
  17. anmin_wwod_kolvo = int(input("Сколько их: "))
  18.  
  19. while anmin_wwod_kolvo != 0:
  20. goloca += anmin_wwod_golosa
  21. anmin_wwod_kolvo -= 1
  22. else:
  23. ime = wwodimoe
  24.  
  25. if ime == "stop":
  26. break
  27. if ime in liudi:
  28. print("Такой человек уже голосовал")
  29. else:
  30. liudi += [ime]
  31. golos = input("Введите за кого голосует: ")
  32. if golos.isdigit() == True:
  33. goloca += [golos]
  34. else:
  35. print("Введите число")
  36.  
  37.  
  38. wwod(liudi,goloca)
  39.  
  40. print(Counter(goloca).most_common(10))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement