Jan-01-2020, 08:06 AM
Oh right, thanks alot man, i solved it
correct_number = 69 hint_a_min = 0 hint_a_max = 50 hint_b_min = 70 hint_b_max = 99 guess = int(input("Guess a number between 1 and 100: ")) guess_count = 0 guess_max = 10 out_of_guesses = False while guess != correct_number and not(out_of_guesses): if (hint_a_min <= guess <= hint_a_max) and (guess_count < guess_max): guess = int(input("Too cold! Try again: ")) guess_count += 1 elif (hint_b_min <= guess <= hint_b_max) and (guess_count < guess_max): guess = int(input("Too hot! Try again: ")) guess_count += 1 elif (hint_a_max < guess < hint_b_min) and (guess_count < guess_max): guess = int(input("So close! Try again: ")) guess_count += 1 elif (guess > hint_b_max) and (guess_count < guess_max): guess = int(input("Must be a number between 1 and 100: ")) guess_count += 1 else: out_of_guesses = True if out_of_guesses: print("You lost! Try again next time!") else: print("Congratulations!")