#!/usr/bin/env python3

from sys import argv
from math import factorial
from check import *
from proba import proba
from full_straight import full, straight

def helper():
    """Helper for Yams."""
    print("USAGE\n\t\t./201yams d1 d2 d3 d4 d5 c \n")
    print("DESCRIPTION\n\t\td1\tvalue of the first die (0 if not thrown")
    print("\t\td2\tvalue of the second die (0 if not thrown)")
    print("\t\td3\tvalue of the third die (0 if not thrown)")
    print("\t\td4\tvalue of the fourth die (0 if not thrown)")
    print("\t\td5\tvalue of the fifth die (0 if not thrown)")
    print("\t\tc\texpected combination")

def display_result(ref: int, value: int, list: [int], name: str):
    """Display result."""
    name = 'four-of-a-kind' if name == 'four' else name
    name = 'three-of-a-kind' if name == 'three' else name
    print('chances to get a ' + value + ' ' + name + ':  ' + '%0.2f' %
          (proba(ref, value, list) * 100) + '%')

def yams(argv, value):
    """Main program for 201yams."""
    list = []
    for i in range(1, 6):
        list.append(int(argv[i]))
    if value[0] == 'yams' and len(value) == 2:
        display_result(5, value[1], list, value[0])
    elif value[0] == 'four' and len(value) == 2:
        display_result(4, value[1], list, value[0])
    elif value[0] == 'three' and len(value) == 2:
        display_result(3, value[1], list, value[0])
    elif value[0] == 'pair' and len(value) == 2:
        display_result(2, value[1], list, value[0])
    elif value[0] == 'full' and len(value) == 3:
        full(value, list)
    elif value[0] == 'straight' and len(value) == 2 and int(value[1]) >= 5:
        straight(value, list)
    else:
        error()

if __name__ == "__main__":
    if len(argv) == 2 and argv[1] == "-h":
        helper()
    elif len(argv) == 7 and check_dices(argv) == 0:
        value = check_last_value(argv)
        yams(argv, value)
    else:
        error()

0792a63a45f8d4f8abb1ba8a8e480fe4b9d7a38f
<mask token>


def helper():
    """Helper for Yams."""
    print('USAGE\n\t\t./201yams d1 d2 d3 d4 d5 c \n')
    print('DESCRIPTION\n\t\td1\tvalue of the first die (0 if not thrown')
    print('\t\td2\tvalue of the second die (0 if not thrown)')
    print('\t\td3\tvalue of the third die (0 if not thrown)')
    print('\t\td4\tvalue of the fourth die (0 if not thrown)')
    print('\t\td5\tvalue of the fifth die (0 if not thrown)')
    print('\t\tc\texpected combination')


def display_result(ref: int, value: int, list: [int], name: str):
    """Display result."""
    name = 'four-of-a-kind' if name == 'four' else name
    name = 'three-of-a-kind' if name == 'three' else name
    print('chances to get a ' + value + ' ' + name + ':  ' + '%0.2f' % (
        proba(ref, value, list) * 100) + '%')


<mask token>

<mask token>


def helper():
    """Helper for Yams."""
    print('USAGE\n\t\t./201yams d1 d2 d3 d4 d5 c \n')
    print('DESCRIPTION\n\t\td1\tvalue of the first die (0 if not thrown')
    print('\t\td2\tvalue of the second die (0 if not thrown)')
    print('\t\td3\tvalue of the third die (0 if not thrown)')
    print('\t\td4\tvalue of the fourth die (0 if not thrown)')
    print('\t\td5\tvalue of the fifth die (0 if not thrown)')
    print('\t\tc\texpected combination')


def display_result(ref: int, value: int, list: [int], name: str):
    """Display result."""
    name = 'four-of-a-kind' if name == 'four' else name
    name = 'three-of-a-kind' if name == 'three' else name
    print('chances to get a ' + value + ' ' + name + ':  ' + '%0.2f' % (
        proba(ref, value, list) * 100) + '%')


def yams(argv, value):
    """Main program for 201yams."""
    list = []
    for i in range(1, 6):
        list.append(int(argv[i]))
    if value[0] == 'yams' and len(value) == 2:
        display_result(5, value[1], list, value[0])
    elif value[0] == 'four' and len(value) == 2:
        display_result(4, value[1], list, value[0])
    elif value[0] == 'three' and len(value) == 2:
        display_result(3, value[1], list, value[0])
    elif value[0] == 'pair' and len(value) == 2:
        display_result(2, value[1], list, value[0])
    elif value[0] == 'full' and len(value) == 3:
        full(value, list)
    elif value[0] == 'straight' and len(value) == 2 and int(value[1]) >= 5:
        straight(value, list)
    else:
        error()


<mask token>

<mask token>


def helper():
    """Helper for Yams."""
    print('USAGE\n\t\t./201yams d1 d2 d3 d4 d5 c \n')
    print('DESCRIPTION\n\t\td1\tvalue of the first die (0 if not thrown')
    print('\t\td2\tvalue of the second die (0 if not thrown)')
    print('\t\td3\tvalue of the third die (0 if not thrown)')
    print('\t\td4\tvalue of the fourth die (0 if not thrown)')
    print('\t\td5\tvalue of the fifth die (0 if not thrown)')
    print('\t\tc\texpected combination')


def display_result(ref: int, value: int, list: [int], name: str):
    """Display result."""
    name = 'four-of-a-kind' if name == 'four' else name
    name = 'three-of-a-kind' if name == 'three' else name
    print('chances to get a ' + value + ' ' + name + ':  ' + '%0.2f' % (
        proba(ref, value, list) * 100) + '%')


def yams(argv, value):
    """Main program for 201yams."""
    list = []
    for i in range(1, 6):
        list.append(int(argv[i]))
    if value[0] == 'yams' and len(value) == 2:
        display_result(5, value[1], list, value[0])
    elif value[0] == 'four' and len(value) == 2:
        display_result(4, value[1], list, value[0])
    elif value[0] == 'three' and len(value) == 2:
        display_result(3, value[1], list, value[0])
    elif value[0] == 'pair' and len(value) == 2:
        display_result(2, value[1], list, value[0])
    elif value[0] == 'full' and len(value) == 3:
        full(value, list)
    elif value[0] == 'straight' and len(value) == 2 and int(value[1]) >= 5:
        straight(value, list)
    else:
        error()


if __name__ == '__main__':
    if len(argv) == 2 and argv[1] == '-h':
        helper()
    elif len(argv) == 7 and check_dices(argv) == 0:
        value = check_last_value(argv)
        yams(argv, value)
    else:
        error()

from sys import argv
from math import factorial
from check import *
from proba import proba
from full_straight import full, straight


def helper():
    """Helper for Yams."""
    print('USAGE\n\t\t./201yams d1 d2 d3 d4 d5 c \n')
    print('DESCRIPTION\n\t\td1\tvalue of the first die (0 if not thrown')
    print('\t\td2\tvalue of the second die (0 if not thrown)')
    print('\t\td3\tvalue of the third die (0 if not thrown)')
    print('\t\td4\tvalue of the fourth die (0 if not thrown)')
    print('\t\td5\tvalue of the fifth die (0 if not thrown)')
    print('\t\tc\texpected combination')


def display_result(ref: int, value: int, list: [int], name: str):
    """Display result."""
    name = 'four-of-a-kind' if name == 'four' else name
    name = 'three-of-a-kind' if name == 'three' else name
    print('chances to get a ' + value + ' ' + name + ':  ' + '%0.2f' % (
        proba(ref, value, list) * 100) + '%')


def yams(argv, value):
    """Main program for 201yams."""
    list = []
    for i in range(1, 6):
        list.append(int(argv[i]))
    if value[0] == 'yams' and len(value) == 2:
        display_result(5, value[1], list, value[0])
    elif value[0] == 'four' and len(value) == 2:
        display_result(4, value[1], list, value[0])
    elif value[0] == 'three' and len(value) == 2:
        display_result(3, value[1], list, value[0])
    elif value[0] == 'pair' and len(value) == 2:
        display_result(2, value[1], list, value[0])
    elif value[0] == 'full' and len(value) == 3:
        full(value, list)
    elif value[0] == 'straight' and len(value) == 2 and int(value[1]) >= 5:
        straight(value, list)
    else:
        error()


if __name__ == '__main__':
    if len(argv) == 2 and argv[1] == '-h':
        helper()
    elif len(argv) == 7 and check_dices(argv) == 0:
        value = check_last_value(argv)
        yams(argv, value)
    else:
        error()

#!/usr/bin/env python3

from sys import argv
from math import factorial
from check import *
from proba import proba
from full_straight import full, straight

def helper():
    """Helper for Yams."""
    print("USAGE\n\t\t./201yams d1 d2 d3 d4 d5 c \n")
    print("DESCRIPTION\n\t\td1\tvalue of the first die (0 if not thrown")
    print("\t\td2\tvalue of the second die (0 if not thrown)")
    print("\t\td3\tvalue of the third die (0 if not thrown)")
    print("\t\td4\tvalue of the fourth die (0 if not thrown)")
    print("\t\td5\tvalue of the fifth die (0 if not thrown)")
    print("\t\tc\texpected combination")

def display_result(ref: int, value: int, list: [int], name: str):
    """Display result."""
    name = 'four-of-a-kind' if name == 'four' else name
    name = 'three-of-a-kind' if name == 'three' else name
    print('chances to get a ' + value + ' ' + name + ':  ' + '%0.2f' %
          (proba(ref, value, list) * 100) + '%')

def yams(argv, value):
    """Main program for 201yams."""
    list = []
    for i in range(1, 6):
        list.append(int(argv[i]))
    if value[0] == 'yams' and len(value) == 2:
        display_result(5, value[1], list, value[0])
    elif value[0] == 'four' and len(value) == 2:
        display_result(4, value[1], list, value[0])
    elif value[0] == 'three' and len(value) == 2:
        display_result(3, value[1], list, value[0])
    elif value[0] == 'pair' and len(value) == 2:
        display_result(2, value[1], list, value[0])
    elif value[0] == 'full' and len(value) == 3:
        full(value, list)
    elif value[0] == 'straight' and len(value) == 2 and int(value[1]) >= 5:
        straight(value, list)
    else:
        error()

if __name__ == "__main__":
    if len(argv) == 2 and argv[1] == "-h":
        helper()
    elif len(argv) == 7 and check_dices(argv) == 0:
        value = check_last_value(argv)
        yams(argv, value)
    else:
        error()
