Commit 8a602058 by BellCodeEditor

save project

parent 23dfff73
Showing with 21 additions and 0 deletions
import random
player = input("请输入石头、剪刀、布")
list = ["石头","剪刀","布"]
computer = random.choice(list)
print("玩家出"+player)
print("电脑出"+computer)
if computer == player:
print("平局")
if computer == "石头" and player == "剪刀":
print("电脑胜")
if computer == "石头" and player == "布":
print("玩家胜")
if computer == "剪刀" and player == "布":
print("电脑胜")
if computer == "剪刀" and player == "石头":
print("玩家胜")
if computer == "布" and player == "石头":
print("电脑胜")
if computer == "布" and player == "剪刀":
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