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

Administrator / lesson5_7

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

auto save

parent 76efe980
Show whitespace changes
Inline Side-by-side
Showing with 46 additions and 0 deletions
  • 2134.py
2134.py 0 → 100644
View file @ 12a16a84
while True:
import turtle
print("欢迎来到画图系统")
n=input("请输入1:画圆系统,2:画正多边形系统,3:画五角形系统......")
if n=="q":
break
if n=="1":
print("画圆系统")
b=input("请输入圆的半径")
t=turtle.Turtle()
t.circle(int(b))
turtle.done()
if n=="q":
break
if n=="2":
print("画正多边形系统")
b=int(input("请输入边数"))
c=int(input("请输入边长"))
t=turtle.Turtle()
for i in range(b):
t.fd(c)
t.left(180-(b-2)*180/b)
turtle.done()
if n=="q":
break
if n=="3":
print("画五角形系统")
b=int(input("请输入角数"))
c=int(input("请输入边长"))
t=turtle.Turtle()
t.pencolor("red")
t.fillcolor("yellow")
t.begin_fill()
if b%2==0:
for i in range(b):
t.fd(c)
t.left(180*(b-2)/b)
else:
for i in range(b):
t.fd(c)
t.left(180*(b-1)/b)
t.end_fill()
turtle.done()
if n=="q":
break
\ 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