# Arup Guha
# 2/10/2024
# Solution to Junior Knights Random Numbers Homework Problem C

import random

TRIALS = 100000

def main():

    # Set up our accumulator.
    snakeeyes = 0
    
    # Repeat 100000 times!
    for i in range(TRIALS):

        # Generate both dice.
        d1 = random.randint(1,20)
        d2 = random.randint(1,20)

        # Calculate and print total.
        total = d1 + d2

        # Check if we got snake eyes!
        if total == 2:
            snakeeyes += 1

    # Make some calculations.
    percent = snakeeyes/TRIALS*100
    onein = TRIALS//snakeeyes
    
    # Print the final results.
    print("You got snake-eyes ", snakeeyes, " times out of ", TRIALS, ".", sep="")
    print("That is", percent, "percent of the time.")
    print("Roughly, that is 1 in", onein, "times.")
    
# Run it!
main()
