Commit a28f6003 by BellCodeEditor

auto save

parent 23dfff73
Showing with 94 additions and 0 deletions
# 玩家出拳
player=input("请出拳(石头,剪刀,布):")
print("玩家出拳是:"+player)
#计算机出拳
import random
list=["石头","剪刀","布"]
computer = random.choice(list)
print("计算机出拳:"+computer)
#进行判断
if player in list:
if player==computer:
print("平局")
elif (player=="石头") and (computer=="剪刀"):
print("玩家胜利")
elif (player=="剪刀") and (computer=="布"):
print("玩家胜利")
elif (player=="布") and (computer=="石头"):
print("玩家胜利")
else:
print("你输了!")
else:
print("输入有误~")
\ No newline at end of file
import time
list1=[32,37,42,47,52,57,
33,38,43,48,53,58,
34,39,44,49,54,59,
35,40,45,50,55,60,
36,41,46,51,56]
list2=[4,13,22,31,44,53,
5,14,23,36,45,54,
6,15,28,37,46,55,
7,20,29,38,47,60,
12,21,30,39,52]
list3=[1,11,21,31,41,51,
3,13,23,33,43,53,
5,15,25,35,45,55,
7,17,27,37,47,57,
9,19,29,39,49,59]
list4=[2,11,22,31,42,51,
3,14,23,34,43,54,
6,15,26,35,46,55,
7,18,27,38,47,58,
10,19,30,39,50,59]
list5=[16,21,26,31,52,57,
17,22,27,48,53,58,
18,23,28,49,54,59,
19,24,29,50,55,60,
20,25,30,51,56]
list6=[8,13,26,31,44,57,
9,14,27,40,45,58,
10,15,28,41,46,59,
11,24,29,42,47,60,
12,25,30,43,56]
sum=[]
number=0
for l1 in range(len(list1)):
print(list1[l1])
time.sleep(0.5)
sum=input("是否出现了你的年龄:")
if sum=='是'or sum=='1':
number += list1[0]
for l2 in range(len(list2)):
print(list2[l2])
time.sleep(0.5)
sum=input("是否出现了你的年龄:")
if sum=='是'or sum=='1':
number += list2[0]
for l3 in range(len(list3)):
print(list3[l3])
time.sleep(0.5)
sum=input("是否出现了你的年龄:")
if sum=='是'or sum=='1':
number += list3[0]
for l4 in range(len(list4)):
print(list4[l4])
time.sleep(0.5)
sum=input("是否出现了你的年龄:")
if sum=='是'or sum=='1':
number += list4[0]
for l5 in range(len(list5)):
print(list5[l5])
time.sleep(0.5)
sum=input("是否出现了你的年龄:")
if sum=='是'or sum=='1':
number += list5[0]
for l6 in range(len(list6)):
print(list6[l6])
time.sleep(0.5)
sum=input("是否出现了你的年龄:")
if sum=='是'or sum=='1':
number += list6[0]
print(number)
\ 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