Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_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
91ac084d
authored
Nov 14, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
dc70412a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
192 additions
and
0 deletions
func.py
qqq.py
func.py
0 → 100644
View file @
91ac084d
#yyy=0
#x =20
#n=input("请输入奶牛的数量")
#yyy=int(n)*20*7
#print(n+"头可以生产"+str(yyy)+"千克牛奶量")
''''
c=input("输入总秒数")
a=int(c)//3600
b=int(c)-a*3600
b=b//60
c=int(c)-a*3600-b*60
print(a,b,c)
'''
'''
a=6 #长方形肠为6
b=3 #长方形宽为3
s=a*b #长方形的面积为长*宽
print("长方形的面积为:"+str(s))
'''
'''
import turtle
a=turtle.Pen()
a.fillcolor("yellow")
a.pencolor("black")
a.begin_fill()
a.forward(180)
a.left(90)
a.forward(180)
a.goto(0,0)
a.end_fill()
a.fillcolor("red")
a.begin_fill()
a.forward(180)
a.left(-90)
a.forward(180)
a.end_fill()
turtle.done()
'''
'''
import turtle
a=turtle.Pen()
a.circle(100)
a.left(90)
a.forward(200)
a.left(180)
a.forward(100)
a.left(90)
a.forward(100)
a.left(180)
a.forward(200)
turtle.done()
'''
'''
import turtle
a=turtle.Pen()
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.penup()
a.goto(90,45)
a.pendown()
a.fillcolor("blue")
a.begin_fill()
a.circle(50)
a.end_fill()
turtle.done()
'''
'''
import turtle
a=turtle.Pen()
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
turtle.done()
'''
'''
try:
age = int(input('你今年几岁了?'))
except:
print('要输入整数啊')
else:
if age < 18:
print('不可以喝酒奥')
print('程序结束~~')
'''
qqq.py
0 → 100644
View file @
91ac084d
def
new_input
():
total
=
[]
while
True
:
money
=
input
(
'请输入(q退出):'
)
if
money
==
'q'
:
break
else
:
try
:
money
=
int
(
money
)
except
:
print
(
"请重新输入一个数字"
)
else
:
total
.
append
(
money
)
finally
:
print
(
"-"
*
30
)
return
total
#result = new_input()
#print(result)
def
uuu
(
money
):
uuu
=
0
for
i
in
money
:
uuu
=
uuu
+
i
return
uuu
price
=
new_input
()
pay
=
uuu
(
price
)
print
(
"您一共消费了"
+
str
(
pay
)
+
"元!扫码还是现金呢?"
)
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