from random import randint students = ["Codi Anderson", "Kyle Brooks", "Michael Collins", "Alyssa Dubre", "Ethan Frekicks-Delude", "Ben Forbush", "Tim Gerst", "Ben Halcrow", "Jared Harper", "Chris Heilman", "Cody Hughes", "Nathan Hyde", "Emily Jeung", "Derek Joslin", "Michael Kaufman", "Brandon Kirk", "Conor Look", "Madison McDonald", "Diana Marsala", "Ethen McMichael", "Joseph Morgan", "Nicholas Morgan", "Carson Morris", "Dillon Myatt", "Ilham Osman", "Reily Parent", "Zach Peterson", "Jason Richards", "Damon Rothrock", "Austin Schmidtz", "Devin Spaulding", "Christain Uhlig", "Valentina Vargas", "Haley Velisek", "Drew Waite", "Gabe Weir"] winner_1 = randint(0, 36) winner_2 = randint(0, 36) winner_3 = randint(0, 36) def winners(): print "Winners: " for x in range(0, 36): if x == winner_1: print students[x] if x == winner_2: print students[x] if x == winner_3: print students[x] winners() def is_correct(): unable = int(raw_input("If a winner was not eligible, enter that winner. Please only input 1, 2, or 3. (Winner 1 is the first listed, Winner 2 is the second listed, and Winner 3 is the last listed)")) r = winner_1 s = winner_2 t = winner_3 print " " if unable == 1: q = randint(0, 36) print "New Winners: " print students[q] print students[s] print students[t] if unable == 2: q = randint(0, 36) print "New Winners: " print students[r] print students[q] print students[t] if unable == 3: q = randint(0, 36) print "New Winners: " print students[r] print students[s] print students[q] else: pass is_correct()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question