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

bellcode / lesson2-1-1_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 8c6a9569 authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 196b779e
Hide whitespace changes
Inline Side-by-side
Showing with 18 additions and 6 deletions
  • diy1.py
diy1.py
View file @ 8c6a9569
# # # 我们都爱夸夸夸
# # name=input("1234567890:")
# # print("234543234565432345432234"+name)
a=input("1/2/3:")
print("玩家出1:"+a)
import random
B_l=["1","2","3"]
print("玩家出2:"+random.choice(B_l))
\ No newline at end of file
while True:
B_l=["1","2","3"]
p=input("请出1/2/3:")
if p not in B_l:
print("1234567890")
else:
print("玩家1出:"+p)
B_l=["1","2","3"]
B=random.choice(B_l)
print("玩家2出:"+random.choice(B_l))
if p==B:
print("平局")
elif(p=="2"and B=="1")or(p=="3"and B=="2")or(p=="1"and B=="3"):
print("玩家1赢了")
else:
print("玩家1输了")
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