Commit 8eacab6e by BellCodeEditor

save project

parent 9084dd9c
Showing with 31 additions and 0 deletions
import random
s='''
1,石头
2,剪刀
3,布
'''
choice = input(s)
list=('石头''剪刀','布')
cpu=random.choice(list)
if s ='1':
if cpu=='石头':
print('平局')
if cpu=='剪刀':
print('玩家赢')
if cpu=='布':
print('电脑赢')
if s ='2':
if cpu=='石头':
print('电脑赢')
if cpu=='剪刀':
print('平局')
if cpu=='布':
print('玩家赢')
if s ='3':
if cpu=='石头':
print('玩家赢')
if cpu=='剪刀':
print('电脑赢')
if cpu=='布':
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