Commit 3340478d by BellCodeEditor

auto save

parent a0cbfb52
Showing with 37 additions and 2 deletions
# 玩家出拳 # 玩家出拳
\ No newline at end of file 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 == "剪刀") or (player == "剪刀" and computer == "布") or (player == "布" and computer == "石头"):
print("恭喜你,赢了!")
else:
print("很遗憾,你输了!")
else:
print("输入错误")
\ No newline at end of file
week = {1:"星期一",2:"星期二",3:"星期三",4:"星期四",5:"星期五",6:"星期六",7:"星期日"}
day = int(input("请输入今天多少号:"))
day = day % 7
if day == 1:
print(week[1])
elif day == 2:
print(week[2])
elif day == 3:
print(week[3])
elif day == 4:
print(week[4])
elif day == 5:
print(week[5])
elif day == 6:
print(week[6])
else:
print(week[7])
\ 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