import random userTicket=[] for i in range(8): userTicket.append(int(raw_input())) lotteryOh=[] for i in range(8): lotteryOh.append(random.randrange(0,10)) count=0 for i,j in zip(userTicket,lotteryOh): if i==j: count=count+1 if count==7: print "GRAND PRIZE WINNER! YEAH!" elif count ==6: print 'A winner is you!' elif count ==5: print "Winner winner chicken dinner!" elif count ==4: print 'Well, you got most of them, I guess.' elif count ==3: print "I mean, you're not completely terrible." elif count ==2: print '*in comic sans* you tried' elif count ==1: print 'Guess again asshole.' else: print "You didn't even get one." print userTicket print lotteryOh
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