There are a number of issues with your code that needed tidying up. Firstly, you do not need
def main():
at the beginning. Unlike compiled languages, python just starts at the beginning. I also added some print statements so you can see the progress, which is useful for debugging, and removed the duplicate bits, thus:
import random
hidden = random.randint(1,100)
print("hidden: ", hidden)
GuessesTaken = 0
while GuessesTaken < 6:
GuessesTaken = GuessesTaken + 1;
GuessesLeft = 6 - GuessesTaken;
while True:
try:
guess = int(input("Guess which number I am thinking of: "))
except ValueError:
guess = print("That's not a number, guess a NUMBER!")
continue
else:
break
print("hidden:", hidden, "guess:", guess)
if guess < hidden:
print("Your guess is too low, you have ", GuessesLeft, " guesses left")
if GuessesLeft==0:
break
else:
continue
elif guess > hidden:
print("Your guess is too high, you have ", GuessesLeft, " guesses left")
if GuessesLeft==0:
break
else:
continue
elif guess==hidden:
print("Well done! That is the correct number")
break