Commit 57522ef8 by BellCodeEditor

save project

parent c90bc830
Showing with 35 additions and 3 deletions
neme=input("What's your name?") import random
print("Hello,"+neme+"!") small_num=0
\ No newline at end of file big_num=100
boom=random.randint(0,100)
while True:
answer=input("在"+str(small_num)+"到"+str(big_num)+"选择一个数。")
if answer.isdigit():
answer=int(answer)
if answer>=big_num or answer<=small_num:
if answer>=big_num:
if answer>big_num:
print("你说的数比最大数大了,再说一次吧!")
continue
else:
print("你说的数和最大数一样了,再说一次吧!")
continue
else:
if answer<small_num:
print("你说的数比最小数小了,再说一次吧!")
continue
else:
print("你说的数和最小数一样了,再说一次吧!")
continue
elif answer==boom:
print("boom!炸弹爆炸了!炸弹数字是:"+str(boom))
eixt()
elif answer>boom:
print("这个数字不是炸弹哦,继续吧!")
big_num=answer
else:
print("这个数字不是炸弹哦,继续吧!")
small_num=answer
else:
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