You are viewing a single comment's thread from:

RE: Steem-Python Beginner Series : Competition Script - Picking a Random Winner

in #steemdev8 years ago

Looking at your code looks so easy lol

I'm new at Python and new at Steemit.
Putting these two together is a perfect way of learning!
I hope you will write a lot of these beginner steemit/python tutorials.

Sort:  

Hey thanks for the reply and yes, I'll be doing more of these in the future so stay tuned!

I tried your code and it is working fine although I was having an error for a while until I figure it out, that I only posted one short introduction post, that of course no one re-blogged, so my list of potential winners was empty and that's why program crashed.

Maybe a quick check if list of potential winners is not empty before running random may be a slight improvement :-)

Ah thanks for pointing that out @veleje . I updated it and added some validation before picking a winner :)