import random
secret=random.randint(1,20)
guess=0
tries=0
print("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 trier<6:
guess=input("what's yer guess?")
if guess<secret:
print("too low, ye scurvy dog?")
elif guess>secret:
print("too high, landlubber!")
tries=tries + 1《提示这里出错了,求高手解答》
if guess==secret:
print("avast! ye got it! found my secret,ye did")
else:
print("no more guess! better luck next time,matey!")
print('"the secret number was",secret')
secret=random.randint(1,20)
guess=0
tries=0
print("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 trier<6:
guess=input("what's yer guess?")
if guess<secret:
print("too low, ye scurvy dog?")
elif guess>secret:
print("too high, landlubber!")
tries=tries + 1《提示这里出错了,求高手解答》
if guess==secret:
print("avast! ye got it! found my secret,ye did")
else:
print("no more guess! better luck next time,matey!")
print('"the secret number was",secret')