Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_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
6cae1a78
authored
May 31, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
500ef73b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
diy.py
diy.py
View file @
6cae1a78
class
student
:
def
__init__
(
self
,
name
,
grade
,
chinese
,
math
,
english
):
self
.
name
=
name
self
.
grade
=
grade
self
.
chinese
=
chinese
self
.
math
=
math
self
.
english
=
english
def
a
(
self
):
b
=
self
.
chinese
+
self
.
math
+
self
.
english
return
b
gwx
=
student
(
"郭文学"
,
6
,
95
,
96
,
97
)
count
=
gwx
.
a
()
print
(
count
)
print
(
'名字'
,
gwx
.
name
)
print
(
'年级'
,
gwx
.
grade
)
print
(
'语文'
,
gwx
.
chinese
)
print
(
'数学'
,
gwx
.
math
)
print
(
'英语'
,
gwx
.
english
)
\ No newline at end of file
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