Commit 5f80b7f9 by BellCodeEditor

auto save

parent 23dfff73
Showing with 43 additions and 0 deletions
import turtle*
pencolor(red)
fillcolor(blue)
begin_fill
for i in range(5):
forward(100)
left(144)
end_fill()
\ No newline at end of file
# 玩家出拳
import random
c=['布','剪刀','石头']
computer=random.choices(c)
a=input('请输入:')
print('player:'+a)
print('computer:'+computer)
if a in c:
if a==computer:
print('平局')
if a=='剪刀' and computer=='布' or a=='布' and computer=='石头' or a=='石头' and computer=='剪刀':
print('你赢了')
if a=='布' and computer=='剪刀' or a=='石头' and computer=='布' or a=='剪刀' and computer=='石头':
print('你输了')
else:
print('输入错误')
\ No newline at end of file
# 玩家出拳
import random
c=['布','剪刀','石头']
c[0]<c[2]
c[1]<c[0]
c[2]<c[1]
computer=random.randint(c)
a=input('请输入:')
if a==c:
print('平局')
if a>c:
print('你赢了')
if a<c:
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