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

save project

parent 4397c990
Show whitespace changes
Inline Side-by-side
Showing with 33 additions and 7 deletions
  • diy1.py
  • diy5.py
diy1.py
View file @ 95731ab1
# 玩家出
import random
a = input('玩家出拳')
print("玩家出拳:"+a)
b = ['剪刀','石头','布']
print("电脑出拳:"+random.choice(b))
\ No newline at end of file
import turtle
pen = turtle.Pen()
pen.goto(0,0)
pen.forward(0)
pen.fillcolor('yellow')
pen.begin_fill()
for i in range(4):
forward(400)
right(90)
pen.end_fill()
pen.hideturtle()
turtle.done()
This diff is collapsed. Click to expand it.
diy5.py 0 → 100644
View file @ 95731ab1
import turtle
import random
"""画出五角星,上色"""
pc = input('请输入轮廓色:')
pen=turtle.Pen()
pen.goto(0,0)
pen.forward(0)
pen.pencolor(pc)
pen.fillcolor("red")
pen.begin_fill()
for i in range(5):
pen.forward(100)
pen.right(144)
pen.forward(100)
pen.left(72)
pen.end_fill()
pen.hideturtle()
turtle.done()
\ 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