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 8489a671 authored 2 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 457edf1c
Hide whitespace changes
Inline Side-by-side
Showing with 10 additions and 7 deletions
  • diy1.py
diy1.py
View file @ 8489a671
p=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
print("玩家出拳:"+p)
from random import*
list=["石头","剪刀","布"]
cr=choice(list)
print("电脑出拳"+cr)
if p == cr:
print("平局,再来一次")
elif (p=="石头" and cr=="剪刀") or (p=="剪刀" and cr=="布") or (p=="布" and cr=="石头"):
print("计算机输了,运气真不好,恭喜你")
if p in list:
if p == cr:
print("平局,再来一次")
elif (p=="石头" and cr=="剪刀") or (p=="剪刀" and cr=="布") or (p=="布" and cr=="石头"):
print("计算机输了,运气真不好,恭喜你")
else:
print("你竟然输了,真笨")
else:
print("你竟然输了,真笨")
\ No newline at end of file
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