def start():                                                # define the fuction "start"
    print("Good luck!!!!!!!")                               # wishing Goog luck to polayer
    import random                                           # importiing random library to generate random numbers
    n1=random.randint(0,9)                                  # define n1 as random number from 1 to 9
    n2=random.randint(0,9)                                  # define n2 as random number from 1 to 9
    n3=random.randint(0,9)                                  # define n3 as random number from 1 to 9
    print("Youre numbers are [[[ ", n1, n2, n3, "  ]]]")    # print out the numbers
    if n1 == n2 == n3 and (n1 * 3) == 27:                   # the least likely variant [999] will be checked.
        print("congratulations YOU win 2000 points")        # print out the win message
        a=int(2000)                                         # "a" represents the value of the score earned
        summa.append(a)                                     # add the value "a" to a predefined list.
        g = int(sum(summa))                                 # we add up all the elements of the list.
        print("At the moment you have won ",g ," points")   # we print the current result of points
    elif n1 == n2 == 9 or n1 == n3 == 9 or n2 == n3 == 9:   # the second the least likely variant [99N][9N9][N99] will be checked.
        print("congratulations YOU win 200 points")         # print out the win message
        a=int(200)                                          # "a" represents the value of the score earned
        summa.append(a)                                     # add the value "a" to a predefined list.
        g = int(sum(summa))                                 # we add up all the elements of the list.
        print("At the moment you have won ",g ," points")   # we print the current result of points

    elif n1 == n2 != n3 or n1 == n3 != n2 or n2 == n3 != n1: # Check if we have a number that is repeated twice
        print("congratulations YOU win 5 points")           # print out the win message
        a=int(5)                                            # "a" represents the value of the score earned
        summa.append(a)                                     # add the value "a" to a predefined list.
        g = int(sum(summa))                                 # we add up all the elements of the list.
        print("At the moment you have won ",g ," points")   # we print the current result of points
    elif n1 == n2 == n3:                                    # check if we have a number that is repeated 3 times
        print("congratulations YOU win 15 points")          # print out the win message
        a=int(15)                                           # "a" represents the value of the score earned
        summa.append(a)                                     # add the value "a" to a predefined list.
        g = int(sum(summa))                                 # we add up all the elements of the list.
        print("At the moment you have won ",g ," points")   # we print the current result of points
    else:
        print("Youre point are 0")                          # if none of the above is true then it prints on the screen
        a = int(0)                                          # "a" represents the value of the score earned
        summa.append(a)                                     # add the value "a" to a predefined list.
        g = int(sum(summa))                                 # we add up all the elements of the list.
        print("At the moment you have won ",g ," points")   # we print the current result of points




e=input("Spin? y/n  ")                # Ask the user to enter "y" for yes and "n" for no
summa=[0]
while e == "y":                       # Define actions for "y"
    print("Let´s Spin then")          # print out a message
    start()                           # execute te function "start()" from above
    e = input("Spin? y/n   ")          # looping the algorithm
else :                                # Define actions for another input
    print(" Thank you for the game")  # print out a message
    summa.clear()
