Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import Counter
- goloca = []
- liudi = []
- def wwod(liudi, goloca):
- while True:
- wwodimoe = input("Введите имя: ")
- if wwodimoe == "admin":
- while True:
- anmin_wwod_golosa = input("За кого голос: ")
- if anmin_wwod_golosa == "stop":
- break
- else:
- anmin_wwod_kolvo = int(input("Сколько их: "))
- while anmin_wwod_kolvo != 0:
- goloca += anmin_wwod_golosa
- anmin_wwod_kolvo -= 1
- else:
- ime = wwodimoe
- if ime == "stop":
- break
- if ime in liudi:
- print("Такой человек уже голосовал")
- else:
- liudi += [ime]
- golos = input("Введите за кого голосует: ")
- if golos.isdigit() == True:
- goloca += [golos]
- else:
- print("Введите число")
- wwod(liudi,goloca)
- print(Counter(goloca).most_common(10))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement