FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PythonTutorial/OOPKwarges.py at master · SaraAdel540/PythonTutorial · GitHub
SaraAdel540
/
PythonTutorial
Public
forked from
hussien89aa/PythonTutorial
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
PythonTutorial
/
OOPKwarges.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (20 loc) · 660 Bytes
Breadcrumbs
PythonTutorial
/
OOPKwarges.py
Copy path
File metadata and controls
28 lines (20 loc) · 660 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class
Car
:
def
__init__
(
self
,
**
kwargs
):
self
.
Data
=
kwargs
def
GetOwner
(
self
):
print
(
"Owner Name "
,
self
.
Data
[
"Name"
])
print
(
"Car Model "
,
self
.
Data
[
"Model"
])
print
(
"Year "
,
self
.
Data
[
"Year"
])
def
Set_Model
(
self
,
Model
):
self
.
Data
[
"Model"
]
=
Model
def
Get_Model
(
self
):
print
(
"Car Model "
,
self
.
Data
[
"Model"
])
def
main
():
mycar
=
Car
(
Name
=
"Hussein Alrubaye"
,
Model
=
"camer 2015"
,
Year
=
2015
)
mycar
.
GetOwner
()
Jencar
=
Car
(
Name
=
"Jen Alrubaye"
,
Model
=
"sony x"
,
Year
=
2015
)
Jencar
.
GetOwner
()
#jen model set
Jencar
.
Set_Model
(
"2016"
)
Jencar
.
Get_Model
()
if
__name__
==
'__main__'
:
main
()
Back
|
FazBrowse Home
|
New Git URL