#---------------------------------------------------------
#
# Yahtzee
#
# In the game "Yahtzee" five dice are rolled and if all
# five have the same value the player scores 50, but
# otherwise zero.
#
# Define a function with five integer parameters, each
# representing a die's face value (i.e., between 1 and 6).
# The function should return 50 if all the supplied
# arguments are the same value, otherwise it should
# return 0.
#
# Trivia: The singular of "dice" is "die".
#


#---------------------------------------------------------
# These are the tests your function must pass.
#
""" 
>>> yahtzee(5, 5, 5, 5, 5) # Test 1. Normal case - yahtzee with 5s
50

>>> yahtzee(1, 1, 1, 1, 1) # Test 2. Normal case - yahtzee with 1s
50

>>> yahtzee(1, 2, 3, 4, 5) # Test 3. Normal case - no yahtzee, all different numbers
0

>>> yahtzee(1, 1, 1, 1, 2) # Test 4. Normal case - no yahtzee, 4 numbers the same, last one different
0

>>> yahtzee(2, 1, 1, 1, 1) # Test 5. Normal case - no yahtzee, 4 numbers the same, first one different
0

>>> yahtzee(1, 1, 2, 1, 1) # Test 6. Normal case - no yahtzee, 4 numbers the same, middle one different
0

>>> yahtzee(1, 1, 2, 3, 1) # Test 7. Normal case - no yahtzee, 3 numbers the same
0

>>> yahtzee(1, 3, 2, 3, 2) # Test 8. Normal case - no yahtzee, 2 lots of 2 numbers the same
0

>>> yahtzee(5, 5, 5, 5, 5) == 50 # Test 9. Check value is returned not printed
True

"""


#---------------------------------------------------------

##### DEFINE YOUR yahtzee FUNCTION HERE



def yahtzee(die1, die2, die3, die4, die5):
    if die1 == die2 and die2 == die3 and die3 == die4 and die4 == die5 and die5 == die1:
        
        return 50
        print "50"
    else:
        
        return 0
        print '0'
        
    


    

    
    


    
    




#---------------------------------------------------------
# This main program executes the tests above when this
# file is run.
#
from doctest import testmod, REPORT_ONLY_FIRST_FAILURE
print testmod(verbose = False,
              optionflags = REPORT_ONLY_FIRST_FAILURE)

