I am currently working on a number guessing game, in that a random digit between 1 and 6, denotes a roll of a dice. The random number will then become the number of allowed guesses from the user. I am not able to get the dice number to be the same as the number of guesses allowed.

This is what I have so far:

import random

number = random.randint(1, 100)

player_name = input("Hello, What's your name?")

number_of_guesses = 0

print('okay! '+ player_name+ ' I am guessing a number between 1 and 100:')

min_value = 1

max_value = 6

print(random.randint(min_value, max_value))

while number_of_guesses < 5:

guess = int(input())

number_of_guesses += 1

if guess < number:

print("Your guess is too low")

if guess > number:

print("Your guess is too high")

if guess == number:

break

if guess == number:

print("You guessed the number in " + str(number_of_guesses) + " tries!")

else:

print("You did not guess the number, the number was " + str(number))