Commit 94c28a9a by BellCodeEditor

save project

parent a0cbfb52
Showing with 28 additions and 2 deletions
# 玩家出拳
\ No newline at end of file
# 玩家出拳
import random
print('开始游戏!')
c = random.randint(1,3)
#石头:1 剪刀:2 布:3
p = input('请出拳:')
print('玩家出拳:' + p)
if p == '石头' :
if c == '1':
print('本轮结果:平局')
if c == '2':
print('本轮结果:玩家获胜!')
if c == '3':
print('本轮结果:电脑获胜!')
if p == '剪刀' :
if c == '1':
print('本轮结果:电脑获胜!')
if c == '2':
print('本轮结果:平局')
if c == '3':
print('本轮结果:玩家获胜!')
if p == '布' :
if c == '1':
print('本轮结果:玩家获胜!')
if c == '2':
print('本轮结果:电脑获胜!')
if c == '3':
print('本轮结果:平局')
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