Random Winner Generator - Python Tkinter GUI Tutorial #39

in #programming4 years ago

Yesterday I announced a sweapstakes to give away a Codemy membership. In this video we'll write some code to randomly select our 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!

✅ Watch The Entire tKinter Playlist
http://bit.ly/2UFLKgj

✅ Subscribe To My YouTube Channel:
http://bit.ly/2IGzvOR

▶️ See More At:
https://Codemy.com

✅ Join My Facebook Group:
http://bit.ly/2GFmOBz

▶️ Learn to Code at https://Codemy.com
Take $22 off with coupon code: youtube

Coin Marketplace

STEEM 0.31
TRX 0.12
JST 0.033
BTC 64341.19
ETH 3145.13
USDT 1.00
SBD 4.00