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
5f60c606
authored
Aug 13, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
39ede87f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
33 deletions
1.py
func.py
1.py
View file @
5f60c606
def
f
():
total
=
[]
while
True
:
unit
=
input
(
"请输入:"
)
try
:
if
unit
==
'q'
:
break
else
:
unit
=
int
(
unit
)
except
:
print
(
'请重新输入整数'
)
else
:
total
.
append
(
unit
)
f
()
\ No newline at end of file
func.py
View file @
5f60c606
def
e
():
class
Dog
:
total
=
[]
def
__init__
(
self
):
while
True
:
self
.
f
=
4
unit
=
input
(
"请输入:"
)
self
.
e
=
2
if
unit
==
'q'
:
self
.
h
=
1
break
self
.
ear
=
2
else
:
self
.
skin
=
"white"
try
:
def
run
():
unit
=
int
(
unit
)
print
(
"狗狗跑起来"
)
except
:
class
Q
(
Dog
):
print
(
"请重新输入"
)
def
__init__
(
self
)
else
:
super
()
.
__init__
(
self
)
total
.
append
(
unit
)
self
.
skin
=
"black"
return
total
a
=
Q
()
print
(
Q
.
skin
)
\ No newline at end of file
result
=
e
()
print
(
result
)
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