使用Python编的猜数字小游戏

import random secret = random.randint(1, 30) guess = 0 tries = 0 print("我叫丁丁,我有一个秘密数字!") print("数字从1到30,你只有6次机会!") while int(guess) != secret and tries < 6: print("你猜的数字是?") guess = input()
相关文章
相关标签/搜索