Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-1_DIY1
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
7c7e5e9c
authored
Nov 22, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
4cac003e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
0 deletions
1.py
2.py
3.py
4.py
1.py
0 → 100644
View file @
7c7e5e9c
print
(
"Hello world!"
)
#字符串
print
(
100
)
#整数
print
(
"100"
)
#字符串
print
(
100
+
100
)
#+起运算作用
print
(
"小明"
+
"去上课"
)
#+起连接作用
print
(
"100+100"
)
#字符串
print
(
"100"
+
"100"
)
#+起连接作用
\ No newline at end of file
2.py
0 → 100644
View file @
7c7e5e9c
import
turtle
#导入画图工具
turtle
.
pencolor
(
"red"
)
#设置画笔颜色
turtle
.
fillcolor
(
"yellow"
)
#设置填充颜色
turtle
.
begin_fill
()
#开始填充
for
i
in
range
(
36
):
#画太阳花
turtle
.
forward
(
200
)
#边长200
turtle
.
right
(
170
)
#旋转170度
turtle
.
end_fill
()
#结束填充
turtle
.
done
()
#保留画布
3.py
0 → 100644
View file @
7c7e5e9c
a
=
100
#整数int
b
=
"100"
#字符串str
c
=
"100.5"
#浮点型 float
d
=
[
100
,
101
,
102
,
103
]
#列表list
print
(
type
(
a
))
#输出变量a的数据类型
print
(
type
(
b
))
#输出变量b的数据类型
print
(
type
(
c
))
#输出变量c的数据类型
print
(
type
(
d
))
#输出变量d的数据类型
\ No newline at end of file
4.py
0 → 100644
View file @
7c7e5e9c
import
random
a
=
random
.
randint
(
1
,
10
)
print
(
a
)
\ No newline at end of file
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