[Ausbildung] Python – finaler 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

Leave a Comment

Bitte beachten Sie,: Kommentar Moderation ist aktiviert und kann Ihren Kommentar verzögern. Es besteht keine Notwendigkeit zur Stellungnahme reichen Sie.