Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_2
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
6bd6d333
authored
Dec 25, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
18b4ee3d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
2.py
__pycache__/func.cpython-37.pyc
func.py
yuan.py
2.py
View file @
6bd6d333
import
func
a
=
func
.
new_input
()
b
=
func
.
sum
(
a
)
print
(
'总共得了'
+
str
(
b
)
+
'分'
)
\ No newline at end of file
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
6bd6d333
File added
func.py
View file @
6bd6d333
...
...
@@ -15,8 +15,8 @@ def sum(money):
for
i
in
money
:
b
+=
i
return
b
c
=
new_input
()
a
=
sum
(
c
)
print
(
'总共需要'
+
str
(
a
)
+
'元。'
)
print
(
c
)
#
c=new_input()
#
a=sum(c)
#
print('总共需要'+str(a)+'元。')
#
print(c)
\ No newline at end of file
yuan.py
0 → 100644
View file @
6bd6d333
try
:
def
yuan_c
():
r
=
float
(
r2
)
c
=
2
*
r
*
3.14
return
c
def
yuan_s
():
r3
=
float
(
r2
)
s
=
r3
*
r3
*
3.14
return
s
r2
=
input
(
'请输入半径(cm):'
)
cc
=
yuan_c
()
ss
=
yuan_s
()
print
(
'周长:'
+
str
(
cc
)
+
'cm'
,
'面积:'
+
str
(
ss
)
+
'cm²'
)
except
:
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