Commit 807c483c by BellCodeEditor

save project

parent 3754630e
Showing with 16 additions and 0 deletions
import random
n=random.randint(1,100)
a=int(input("请输入数字(1——100)"))
while True:
if a>100 or a<1:
a=int(input("请输入1——100内的数字"))
else:
if n==a:
break
elif n>a:
a=int(input("猜小了,请再次输入"))
else:
a=int(input("猜大了,请再次输入"))
print("猜对了")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment