Commit 17074399 by BellCodeEditor

save project

parent 46193582
Showing with 23 additions and 2 deletions
import turtle
pen=turtle.Pen
pen.write("S\nB",font=("Times",20,"normal"))
pen.hideturtle()
turtle.done()
\ No newline at end of file
...@@ -3,4 +3,19 @@ print("玩家出拳:"+player) ...@@ -3,4 +3,19 @@ print("玩家出拳:"+player)
import random import random
f=["石头","剪刀","布"] f=["石头","剪刀","布"]
computer=random.choice(f) computer=random.choice(f)
print("计算机出拳:"+computer) print("计算机出拳:"+computer)
\ No newline at end of file
if player==computer :
print("平局")
if player=="石头" and computer=="剪刀":
print("玩家赢")
if player=="剪刀" and computer=="布":
print("玩家赢")
if player=="布" and computer=="石头":
print("玩家赢")
if player=="剪刀" and computer=="石头":
print("玩家输")
if player=="布" and computer=="剪刀":
print("玩家输")
if player=="石头" and computer=="布":
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