Random Winner Generator - Python Tkinter GUI Tutorial #39

Опубликовано: 13 Февраль 2020
на канале: John Elder
19,166
515

Yesterday I announced a sweapstakes to give away a Codemy membership. In this video we'll write some code to randomly select our winner! HINT: I picked more than one winner!


I took all the entries and added them to a Python list. I then converted the list into a Python set to automatically remove any duplicates, then converted it back to a Python list.


Next I generated a random number between 0 and the length of the list (minus one). Now we can use that to pick the winner from the list!



I wrapped the whole thing in a tKinter GUI so we would have something to look at!


На этой странице сайта вы можете посмотреть видео онлайн Random Winner Generator - Python Tkinter GUI Tutorial #39 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь John Elder 13 Февраль 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 19,166 раз и оно понравилось 515 зрителям. Приятного просмотра!