Commit 8bd9dcf7 by BellCodeEditor

auto save

parent 6053728e
Showing with 29 additions and 2 deletions
# 玩家出拳
player = input("请准备出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
#电脑出拳
import random
list = ["石头","剪刀","布"]
list = ["石头","剪刀", "布"]
computer = random.choice(list)
print(computer)
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
import turtle
p = turtle.Pen()
p.shape("turtle")
p.color("red","blue")
p.width(15)
p.speed(5)
p.begin_fill()
p.circle(80)
p.end_fill()
turtle.done()
\ 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