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

bellcode / lesson2-3-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 628be975 authored 7 months ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 8ad3c495 c381162l760p219a8052/is647367
Hide whitespace changes
Inline Side-by-side
Showing with 11 additions and 6 deletions
  • diy1.py
diy1.py
View file @ 628be975
import random import random
piayer=input("玩傢請出拳:石/剪/布") player=input("玩傢請出拳:石/剪/布")
print("玩傢出拳:"+piayer)# 玩家出拳 print("玩傢"+player)
list=["石","剪","布"] list = ["石","剪","布"]
compuret=random.choice(list) computer = random.choice(list)
print("電腦出拳"+compuret) print("電腦出拳:"+computer)
\ No newline at end of file if player == computer:
print("平侷")
elif (player == "石" and computer == "剪")or(player == "剪" and computer == "布")or(player == "布" and computer == "石"):
print("你贏了")
else:
print("你輸了")
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