本人小菜鸟一个哈哈
import random
num=1
yin_num=0
shu_num=0
while num <=3:
if shu_num ==2 or yin_num==2:
break
user = int(input('chu0 1 2'))
if user>2:
print('不能出大于2')
else:
data =['shi','jian','bu']
com = random.randint(0,2)
print(data[user],data[com])
if user==com:
print('ping')
continue
elif (user==0 and com ==1) or (user ==1 and com==2) or (user==2 and com==0):
print('shnent')
yin_num +=1
else:
print('shule')
shu_num+=1
import random
import time
bomb = random.randint(1,99)
print(bomb)
start=0
end=99
while 1==1:
people= int(input('shu{},{}'.format(start,end)))
if people>bomb:
print('da')
end =people
elif people<bomb:
print('xiao')
start=people
else:
print('BOOM!!')
break
print('dengdai{}<{}'.format(start,end))
time.sleep(1)
com=random.randint(start+1,end-1)
print('diannao{}'.format(com))
if com >bomb:
print('dda')
end =com
elif com<bomb:
print('xiaole')
start=com
else:
print("BOOM!!!")
break
|