[training] Python – Final Code

ans = 38

min = 0
max = 100

while(True):
    guess = int(input("Please input a number that between %d ~ %d : "%(min, max)))
    if (guess > ans):
        max = guess
    if (guess < ans):
        min = guess
    if (guess == ans):
        print("Bingo!!")
        break

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments