Ask the user to enter a number to be guessed say between 1 and 100. The computer selects a random number in that range. If the computer guesses too low, then that number+1 becomes the lower number in the range for the next random number to choose from and so on for too high. On the first program that you posted here, what happens if the person guesses the number on the 6th and final try? A related question/answer, why is "isCorrect" declared but never used? The Python Style Guide says that variables names should be all lower case --> so "is_correct", BTW.
## only a partial solution
##
is_corect = False
while not is_correct and count < maximum:
guess = int(input("Take a guess: "))
if guess < secret_number:
print("Higher...") ## does "Higher" mean number is higher or guess is higher
elif guess > secret_number:
print("Lower...")
else : ## 2 numbers are equal
is_correct = True
woooee
Posting Maven
2,707 posts since Dec 2006
Reputation Points: 827
Solved Threads: 780
Skill Endorsements: 9