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

auto save

parent 3e444abc
Show whitespace changes
Inline Side-by-side
Showing with 37 additions and 11 deletions
  • demo.py
  • diy1.py
demo.py
View file @ 505ba83d
ints = input("请出拳(石头/剪刀/布)")
print("玩家出拳:"+ints)
# # 输入一个十以内数字,测试你的未来
# num = int(input("请输入10以内的整数:"))
# if num == 10:
# print("未来可期~")
# elif num >= 7 and num < 10:
# print("未来不可限量")
# elif num > 3 and num <= 6:
# print("前途不可限量")
# else:
# print("努力吧~")
# 1.导入random模块
import random
# 2.玩家出拳
play = input("请玩家出拳(石头/剪刀/布):")
print("玩家出拳:"+play)
# 3.计算机出拳
com = ["石头","剪刀","布"]
coms = random.choice(com)
print("计算机出拳:"+coms)
if
\ No newline at end of file
This diff is collapsed. Click to expand it.
diy1.py
View file @ 505ba83d
import random
ikn = input("请出拳")
list = []
for i in range(100):
list.append(i)
# 输入一个十以内数字,测试你的未来
num = int(input("请输入10以内的整数:"))
for i in range(10):
num = random.choice(list)
print(num)
\ No newline at end of file
if num == 10:
print("未来可期~")
elif num >= 7 and num < 10:
print("未来不可限量")
elif num > 3 and num <= 6:
print("前途不可限量")
else:
print("努力吧~")
\ 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