Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson1_1
This project
Loading...
Sign in
Toggle navigation
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
96f3ef25
authored
Feb 26, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
db4ec920
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
hello.py
hello.py
0 → 100644
View file @
96f3ef25
"""
print("hello world")
name = " Jake "
word = "TANKE YOU"
print(name+word)
num = 9
float_num = 3.1415926
name = " Jake "
goods = ["雪碧","可乐","咖啡"]
print(type(num))
print(type(float_num))
print(type(name))
print(type(goods))
import turtle
pen = turtle.Pen()
pen.shape('turtle')
pen.forward(100)
pen.left(60)
pen.forward(100)
turtle.done()
#使用turtle模块画出五角星
import turtle
pen = turtle.Pen()
for i in range (5):
pen.forward(200)
pen.left(144)
turtle.done()
#给五角星填上红色
import turtle
pen = turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
for i in range (5):
pen.forward(200)
pen.left(144)
pen.end_fill()
turtle.done()
#使用turtle模块
#尝试让画笔重复移动36次
#每次移动200步,旋转170度
"""
import
turtle
pen
=
turtle
.
Pen
()
pen
.
speed
(
1000
)
pen
.
color
(
"blue"
)
pen
.
fillcolor
(
"red"
)
pen
.
begin_fill
()
for
i
in
range
(
36
)
:
pen
.
forward
(
200
)
pen
.
left
(
170
)
pen
.
end_fill
()
turtle
.
done
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment