Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # initial (109 bytes)
- from random import randrange as r
- def choHan(g):print("You",g==("even","odd")[(r(6)+r(6))%2]and"win"or"lose")
- # OR
- def choHan(g):print("You",("lose","win")[("even","odd")[(r(6)+r(6))%2]==g])
- # edit (105 bytes)
- def choHan(g):print("You","lwoisne"["eovdedn"[(r(6)+r(6))%2::2]==g::2])
- # final version (99 bytes)
- r=__import__('random').randrange
- def choHan(g):print("You","lwoisne"["eo"[(r(6)+r(6))%2]==g[0]::2])
Add Comment
Please, Sign In to add comment