<commit_before>#/usr/bin/python3
import random


'''
系统随机生成一个1~100之间的整数，玩家有5次机会，每猜一次系统就会提示玩家该数字是偏大还是偏小，如果猜中了，则告知玩家并提前结束游戏，如果5次都没猜中，结束游戏并告知正确答案。
'''
gen_num = random.randint(1, 100)
times = 0
while True:
    print("Please input your guess number:")
    guess = input()
    if int(guess) > gen_num:
        print("Sorry, larger than generated number.")
    elif int(guess) == gen_num:
        print("Bingo, you got it!")
        break
    else:
        print("Sorry, smaller than generated number")
    times += 1
    if times >= 5:
        print("Sorry, you run out of times. Game over!")
        break
<commit_msg>modify question2 answer<commit_after>#/usr/bin/python3
import random


'''
系统随机生成一个1~100之间的整数，玩家有5次机会，每猜一次系统就会提示玩家该数字是偏大还是偏小，如果猜中了，则告知玩家并提前结束游戏，如果5次都没猜中，结束游戏并告知正确答案。
'''
gen_num = random.randint(1, 100)
times = 5
while times > 0:
    times -= 1
    print("Please input your guess number:")
    try:
        guess = int(input())
    except ValueError as e:
        print("Please input valid number.")
        continue
    if guess > gen_num:
        print("Sorry, larger than generated number.")
    elif guess == gen_num:
        print("Bingo, you got it!")
        break
    else:
        print("Sorry, smaller than generated number")
else:
    print("Sorry, you run out of times. Game over!")
{'fraction_non_alphanumeric': 0.11773700305810397, 'fraction_numerical': 0.02217125382262997, 'mean_word_length': 3.1163522012578615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5796151', 'n_tokens_mistral': 546, 'n_tokens_neox': 576, 'n_words': 118}