import randomsecret = random.randint(1,100)guess = 0tries = 0print( "AHOY! I'm the dread Pirate roberts, and I have a secret!")print("It is a number from 1 to 99. I'll give you 6 tries.")while guess !=secret and tries < 6:guess = int(input("what's yer guess?"))if guess < secret:
    print ("too low")
elif guess > secret:
    print("too high")
    
tries=tries+1
    if guess == secret:
    print("down!")else:    print("no more")    print("the secret was",secret)
                    
                    
                添加回答
举报
0/150
	提交
		取消
	