Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_3
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
28ad3672
authored
Mar 27, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a8e5975b
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
101 additions
and
0 deletions
a.py
买单.py
字典
字典.py
学生.py
密码信息.py
弹簧.py
文件.py
桃园结义.py
自动售货机.py
菜谱.py
a.py
0 → 100644
View file @
28ad3672
i
=
[
's'
,
'd'
,
'a'
,
'd'
,]
p
=
[
'd'
,
'f'
]
i
.
extend
(
p
)
print
(
i
)
\ No newline at end of file
买单.py
0 → 100644
View file @
28ad3672
def
aaa
():
def
aaa
():
total
=
[]
while
True
:
unit
=
input
(
'请输入价格(按q结束)'
)
if
unit
==
"q"
:
break
else
:
try
:
unit
=
int
(
unit
)
except
:
print
(
'请输入一个整数!!!!:3'
)
else
:
total
.
append
(
unit
)
print
(
'▄︻┻┳══━一'
+
"-"
*
86
)
return
total
a
=
aaa
()
count
=
0
for
i
in
a
:
count
+=
i
print
(
'总价是:'
+
str
(
count
))
字典
0 → 100644
View file @
28ad3672
list1=['张三']
list1=['张三']
print(list1)
\ No newline at end of file
字典.py
0 → 100644
View file @
28ad3672
list1
=
[
'张三'
,
'13'
,
'李四'
,
'15'
,]
list1
=
[
'张三'
,
'13'
,
'李四'
,
'15'
,]
dict1
=
{
'张三'
:
13
,
'李四'
:
15
,}
#print(dict1['张三'])
dict1
[
'王五'
]
=
23
学生.py
0 → 100644
View file @
28ad3672
student
=
[
'悟空'
,
'八戒'
,
'小贝'
,
'波奇'
]
student
=
[
'悟空'
,
'八戒'
,
'小贝'
,
'波奇'
]
student
.
remove
()
\ No newline at end of file
密码信息.py
0 → 100644
View file @
28ad3672
import
random
import
random
mima
=
input
(
'你需要传达的暗语是:'
)
daluan
=
'对我好吃牛未支付呢热更突出呢荨麻疹丸一没玩去角质的武汉瑞丰中心热回复我一恶魔人你现在疯女人汉族四年学位混沌放醋新年祝福日中午未经分析'
a
=
''
for
i
in
mima
:
star1
=
i
star2
=
random
.
choice
(
daluan
)
star3
=
random
.
choice
(
daluan
)
a
=
star1
+
star2
+
star3
+
a
print
(
a
)
\ No newline at end of file
弹簧.py
0 → 100644
View file @
28ad3672
import
turtle
import
turtle
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
pen
.
speed
(
1000
)
screen
.
bgcolor
(
'green'
)
pen
.
hideturtle
()
i
=
0
while
i
<
360
:
pen
.
pencolor
(
'blue'
)
pen
.
penup
()
pen
.
goto
(
0
,
0
)
pen
.
forward
(
200
)
pen
.
pendown
()
pen
.
circle
(
100
)
pen
.
left
(
1
)
i
+=
1
turtle
.
done
()
\ No newline at end of file
文件.py
0 → 100644
View file @
28ad3672
file1
=
open
(
r"D:\郭涵哲\新建文本文档.txt"
,
'w'
,
encoding
=
'utf-8'
)
file1
=
open
(
r"D:\郭涵哲\新建文本文档.txt"
,
'w'
,
encoding
=
'utf-8'
)
file1
.
write
(
'小兰:12本'
)
file1
.
close
()
\ No newline at end of file
桃园结义.py
0 → 100644
View file @
28ad3672
bors
=
[
'刘备'
,
'关羽'
,
'张飞'
]
bors
=
[
'刘备'
,
'关羽'
,
'张飞'
]
for
i
in
range
(
len
(
bors
)):
print
(
bors
[
i
])
ying
=
[
'袁术'
,
'曹操'
,
'公孙胜'
]
ying
.
append
(
'刘备'
)
jiaru
=
[
'关羽'
,
'张飞'
]
ying
.
extend
(
jiaru
)
print
(
ying
)
\ No newline at end of file
自动售货机.py
0 → 100644
View file @
28ad3672
j
=
{
'可口可乐'
:
':3元'
,
'元气森林'
:
'5元'
,
'芬达'
:
':4元'
,
'雪碧'
:
'3元'
}
j
=
{
'可口可乐'
:
':3元'
,
'元气森林'
:
'5元'
,
'芬达'
:
':4元'
,
'雪碧'
:
'3元'
}
print
(
'我们这里有:'
)
for
a
,
b
in
j
.
items
():
print
(
a
,
b
)
k
=
input
(
'你想要买什么? 我想买————'
)
if
k
in
j
:
print
(
k
+
'需要'
+
str
(
j
[
k
]))
else
:
print
(
'此商品还没有上架'
)
\ No newline at end of file
菜谱.py
0 → 100644
View file @
28ad3672
total
=
{
'汤'
:{
'鲫鱼汤'
:
20
,
'紫菜汤'
:
15
},
'主食'
:{
'米饭'
:
5
,
'饺子'
:
10
,
'刀削面'
:
15
},
'配菜'
:{
'白灼菜心'
:,
'油焖大虾'
:,
'糖醋排骨'
:,
'地三鲜'
:,
'黄豆焖猪手'
:}}
total
=
{
'汤'
:{
'鲫鱼汤'
:
20
,
'紫菜汤'
:
15
},
'主食'
:{
'米饭'
:
5
,
'饺子'
:
10
,
'刀削面'
:
15
},
'配菜'
:{
'白灼菜心'
:,
'油焖大虾'
:,
'糖醋排骨'
:,
'地三鲜'
:,
'黄豆焖猪手'
:}}
for
x
,
y
in
total
:
print
(
x
)
\ 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