Commit ebf91049 by BellCodeEditor

save project

parent 3515f1dd
Showing with 43 additions and 2 deletions
# 我们都爱夸夸夸 ''' 我们都爱夸夸夸
\ No newline at end of file name = input("请输入:")
print(name+",加油")'''
'''import turtle
pen=turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
for i in range(5):
pen.forward(200)
pen.left(144)
pen.end_fill()
turtle.done()'''
dog=input("请出:(石头/剪刀/布)")
print(dog)
import random
list=["石头","剪刀","布"]
computer=random.choice(list)
print(computer)
if dog in list:
if dog==computer:
print("平局")
elif dog=="石头" and computer=="剪刀":
print("你赢了")
elif dog=="剪刀" and computer=="布":
print("你赢了")
elif dog=="布" and computer=="石头":
print("你赢了")
else:
print("你输了")
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