Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_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
8ff5ab4d
authored
Mar 09, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
fd037b99
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
0 deletions
di.py
diy.py
dyi.py
idy.py
iyd.py
ydi.py
yid.py
di.py
0 → 100644
View file @
8ff5ab4d
a
=
int
(
input
(
"输入整公里数"
))
b
=
13
c
=
int
(
2.3
)
d
=
int
(
3.45
)
if
a
<=
3
:
print
(
'
%.2
f'
%
b
)
elif
a
>
3
and
a
<=
15
:
print
(
'
%.2
f'
%
((
a
-
3
)
*
c
+
b
))
else
:
print
(
'
%.2
f'
%
((
a
-
15
)
*
d
+
(
15
-
3
)
*
c
+
b
))
\ No newline at end of file
diy.py
View file @
8ff5ab4d
This diff is collapsed.
Click to expand it.
dyi.py
0 → 100644
View file @
8ff5ab4d
import
turtle
a
=
20
turtle
.
pencolor
(
"red"
)
for
i
in
range
(
300
):
turtle
.
forward
(
a
)
turtle
.
left
(
90
)
a
+=
2
turtle
.
done
()
\ No newline at end of file
idy.py
0 → 100644
View file @
8ff5ab4d
a
=
"白日依山尽"
b
=
"黄河入海流"
c
=
"欲穷千里目"
d
=
"更上一层楼"
print
(
a
,
","
,
b
,
"."
,
c
,
","
,
d
,
"."
)
\ No newline at end of file
iyd.py
0 → 100644
View file @
8ff5ab4d
a
=
input
(
"请输入一个日期:(格式为'月/日/年')"
)
b
=
a
.
split
(
"/"
)
c
=
b
[
0
]
d
=
b
[
1
]
e
=
b
[
2
]
months
=
[
'January'
,
'February'
,
'March'
,
'April'
,
'May'
,
'June'
,
'July'
,
'August'
,
'Septeber'
,
'October'
,
'November'
,
'December'
]
c
=
months
[
int
(
c
)
-
1
]
print
(
"日期是:"
+
c
+
' '
+
d
+
','
+
e
)
\ No newline at end of file
ydi.py
0 → 100644
View file @
8ff5ab4d
a
=
int
(
input
(
"请输入星期几:(数字形式)"
))
b
=
[
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
,
"星期日"
]
c
=
b
[
a
-
1
]
print
(
c
)
\ No newline at end of file
yid.py
0 → 100644
View file @
8ff5ab4d
c
=
0
for
i
in
range
(
10
,
100
,
1
):
a
=
i
//
10
b
=
i
%
10
if
a
==
b
:
i
=
i
else
:
i
=
i
+
1
c
=
c
+
1
print
(
c
)
\ 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