Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-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
fe4d7716
authored
Nov 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5525e854
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
12 deletions
dkr.py
dkr.py
View file @
fe4d7716
diy
=
{
"苹果"
:
12
,
"香蕉"
:
21
,
"西瓜"
:
15
}
while
True
:
d
=
input
(
"今日水果"
)
r
=
input
(
"价格"
)
if
d
in
diy
:
if
diy
[
d
]
>
int
(
r
):
print
(
"降价了"
)
else
:
print
(
"不买"
)
else
:
diy
[
d
]
=
int
(
r
)
\ No newline at end of file
import
turtle
turtle
.
pencolor
(
"blue"
)
turtle
.
fillcolor
(
"white"
)
turtle
.
begin_fill
()
turtle
.
circle
(
20
)
turtle
.
end_fill
()
turtle
.
penup
()
turtle
.
goto
(
50
,
0
)
turtle
.
pendown
()
turtle
.
pencolor
(
"black"
)
turtle
.
begin_fill
()
turtle
.
circle
(
20
)
turtle
.
end_fill
()
turtle
.
penup
()
turtle
.
goto
(
100
,
0
)
turtle
.
pendown
()
turtle
.
pencolor
(
"red"
)
turtle
.
begin_fill
()
turtle
.
circle
(
20
)
turtle
.
end_fill
()
turtle
.
penup
()
turtle
.
goto
(
25
,
-
25
)
turtle
.
pendown
()
turtle
.
pencolor
(
"yellow"
)
turtle
.
begin_fill
()
turtle
.
circle
(
20
)
turtle
.
end_fill
()
turtle
.
penup
()
turtle
.
goto
(
75
,
-
25
)
turtle
.
pendown
()
turtle
.
pencolor
(
"green"
)
turtle
.
begin_fill
()
turtle
.
circle
(
20
)
turtle
.
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