Guess the Number(Python)
A few minor things:


Imports should generally be at the module level, not inside functions. 
Use more intention-revealing variable names. no_of_guess is borderline OK, but a, b and c don't tell me anything. 
Think about control flow more carefully. For example:


you increment the guess counter for any numerical input, so you don't necessarily need to wait for the conditional checks; and
outside the loop do you really need to recheck whether the input wasn't "y"?

You can use single-quoted strings to avoid escaping double quote within them. 
You can also reduce duplication by extracting functions and constants


With these suggestions addressed:

import random

RULES = 'Enter "Y" if yes, and anything else to exit. '

def win_prompt():
    return input("You got it! Play again? " + RULES).lower()

def lose_prompt(message):
    return input(message + " Try again? " + RULES).lower()

def guessing_game():
    number_of_guesses = 0
    target = random.randint(1,9)
    continuing = "y"
    while continuing == "y":
        guess = input("Enter a guess: ")
        if guess.isdigit():
            number_of_guesses += 1
            if int(guess) == target:
                continuing = win_prompt()               
                target = random.randint(1,9)
            elif int(guess) &gt; target:
                continuing = lose_prompt("Too high.")
            else:
                continuing = lose_prompt("Too small.") 
        else:
            continuing = lose_prompt("Haha.")
    print("How unfortunate. Well, you made %s guess(es)." % number_of_guesses)


guessing_game()