[ edit ]

import random

def janken_random_hand():
    return( random.randint( 0, 2 ) )

def janken_judge( x, y ):
    return( ((y-x)+3)%3 )