Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_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
50ef26fb
authored
Nov 14, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
4c450c45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
148 additions
and
17 deletions
func.py
func.py
View file @
50ef26fb
def
new_input
():
total
=
[]
while
True
:
unit
=
input
(
"请输入:"
)
if
unit
==
'q'
:
break
else
:
try
:
unit
=
int
(
unit
)
except
:
print
(
"输入错误"
)
else
:
total
.
append
(
unit
)
print
(
"_"
*
30
)
return
total
r
=
new_input
()
print
(
r
)
#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('程序结束~~')
'''
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