import random

option = "yes"
attempts = 0

while option == "yes":

    print("Generating a random number")

    num = random.randint(1, 10)

    print("Guess the random number generated by the computer")

    if attempts > 2:

        hint = input("Need a hint??")
        if hint == "yes":
            print("The number when divided by 10 is: " + str(num/10))

    num1 = input("Random number generated is:")

    attempts = attempts + 1

    if int(num1) < int(num):

        print("Your number is lower")
        print("Random number is:" + str(num))

    elif int(num1) > int(num):

        print("Your number is Higher")
        print("Random number is:" + str(num))

    else:

        print("Bingo!! You guessed it right!")
        print("Number of attempts it took to guess randomly generated number correctly:" + str(attempts))
        attempts = 0

    option = input("Wanna go at it again?? (yes or no)")






