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
4fae42b1
authored
Jul 15, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
8413000d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
28 deletions
__pycache__/func.cpython-37.pyc
cc.py
func.py
sb.py
蔡。py
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
4fae42b1
File added
cc.py
View file @
4fae42b1
def
new_input
():
total
=
[]
zong
=
0
while
True
:
unit
=
input
(
"输入"
)
if
unit
==
'q'
:
break
else
:
try
:
unit
=
int
(
unit
)
except
:
print
(
"价格"
)
else
:
zong
=
zong
+
unit
print
(
"花费"
)
return
zong
a
=
new_input
()
print
(
a
)
\ No newline at end of file
func.py
View file @
4fae42b1
def
new_
input
():
def
new_
sb
():
total
=
[]
zong
=
0
while
True
:
while
True
:
unit
=
input
(
"请输入:
"
)
#unit=input("请输入价格
")
if
unit
==
'q'
:
if
unit
==
"q"
:
break
break
try
:
unit
=
int
(
unit
)
except
:
print
(
"请重新输入"
)
else
:
else
:
total
.
append
(
unit
)
zong
=
zong
+
unit
print
(
total
)
return
zong
new_input
()
a
=
new_sb
()
\ No newline at end of file
print
(
a
)
\ No newline at end of file
sb.py
0 → 100644
View file @
4fae42b1
import
func
sorc
=
func
.
new_sb
()
sum
=
func
.
a
()
print
(
""
)
\ No newline at end of file
蔡。py
0 → 100644
View file @
4fae42b1
++ "b/\350\224\241\343\200\202py"
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