Commit a70fa9eb by BellCodeEditor

save project

parent cea77d24
Showing with 14 additions and 5 deletions
...@@ -4,13 +4,16 @@ print('玩家出',y) ...@@ -4,13 +4,16 @@ print('玩家出',y)
n = ['剪刀','石头','布'] n = ['剪刀','石头','布']
s=random.choice(n) s=random.choice(n)
print('机器人出',s) print('机器人出',s)
if y == s: if y in n:
if y == s:
print('平局') print('平局')
elif y == '剪刀' and s == '布': elif y == '剪刀' and s == '布':
print('你赢了') print('你赢了')
elif y == '布' and s == '石头': elif y == '布' and s == '石头':
print('你赢了') print('你赢了')
elif y == '石头' and s == '剪刀': elif y == '石头' and s == '剪刀':
print('你赢了') print('你赢了')
else: else:
print('你输了') print('你输了')
else :
print('你输错了')
\ No newline at end of file
y = int(input('请输入乌龟的速度'))
print('乌龟需要的时间',100/y)
\ No newline at end of file
import turtle
pen = turtle.Pen()
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