Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson2-2_DIY1

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit c70ba1b5 authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 0373f47a
Hide whitespace changes
Inline Side-by-side
Showing with 9 additions and 25 deletions
  • diy1.py
diy1.py
View file @ c70ba1b5
...@@ -6,28 +6,13 @@ while True: ...@@ -6,28 +6,13 @@ while True:
print("玩家:"+a) print("玩家:"+a)
c=random.choice(b) c=random.choice(b)
print("电脑:"+c) print("电脑:"+c)
if a=="石头": if a==b:
if b=="布": print("平局")
print("you lost") elif a=="剪刀" and b=="布":
if b=="剪刀": print("你赢了")
print("you win") elif a=="布" and b=="石头":
if b=="石头": print("你赢了")
print("平局") elif a=="石头" and b=="剪刀":
print("你赢了")
else: else:
if a=="剪刀": print("你输了")
if b=="布":
print("you win")
if b=="剪刀":
print("平局")
if b=="石头":
print("you lost")
else:
if a=="布":
if b=="布":
print("平局")
if b=="剪刀":
print("you lost")
if b=="石头":
print("you win")
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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