Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_4
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
278bd89c
authored
Jan 28, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
f0c715f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
0 deletions
1.py
2.py
3.py
1.py
0 → 100644
View file @
278bd89c
# """
# 结构:
# 1、顺序
# 2、分支
# 3、循环(有限,无限)
# """
# # # print(list(range(10)))
# # for ab in range(1,20,2):#有限循环
# # print(ab,end=" ")
# # print()
# # i=1
# # while i<20: #有限循环
# # print(i,end=" ")
# # i+=2
# # print()
# # i=1
# # while True: #无限循环
# # print(i,end=" ")
# # i+=2
# # if i>=20:
# # break
# #分支
# a=3
# b=4
# if a>b:#必须是真是假
# print("yes")
# else:
# print("no")
# # if 条件成立(真/假):#必须是真是假
# # 真,就执行
# # elif 条件:
# # 执行
# # else:
# # 假,就执行
# print(int(3.6))
# # print(int('3'))
# print(float('3.9'))
# print(float("4"))
# print(float("ab"))
# a=int(float(input("请输入数字:")))
# # print(type(a))
# _int=3
# print(_int)
# print(int(False))
# print(1 and 0.0 or 3 or 0 or not 0)
print
(
4
*-
4
)
\ No newline at end of file
2.py
0 → 100644
View file @
278bd89c
# # for i in range(10):
# # print(i,end="") #默认end="\n"
# print(1,2,3,4,sep=",")#一行数据,中间的控制符
# #格式化输出
# a=18
# print("我今年",a,"岁",sep="")
# print("我今年"+str(a)+"岁"+"身高"+str())
# print("我今年%s岁,身高%.2f米"%(a,1.87909))
a
,
b
=
1
,
4
print
(
a
,
b
)
\ No newline at end of file
3.py
0 → 100644
View file @
278bd89c
import
turtle
as
t
t
.
speed
(
0
)
t
.
penup
()
t
.
write
(
"你好"
,
font
=
(
"黑体"
,
80
,
"normal"
))
t
.
goto
(
-
100
,
0
)
t
.
pencolor
(
'yellow'
)
t
.
dot
(
100
)
# t.screensize(800,600,"red")
# t.color("red","yellow")
# t.begin_fill()
# t.circle(100)
# t.circle(100,steps=5)
# t.end_fill()
# t.goto(100,0)
# t.hideturtle()
# t.goto(-100,0)
t
.
done
()
\ 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