FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-bootcamp/Classes_Example.py at main · hackbeats/python-bootcamp · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
hackbeats
/
python-bootcamp
Public
Notifications
You must be signed in to change notification settings
Fork
10
Star
5
Code
Issues
7
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-bootcamp
/
Classes_Example.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (10 loc) · 277 Bytes
Breadcrumbs
python-bootcamp
/
Classes_Example.py
Copy path
File metadata and controls
13 lines (10 loc) · 277 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
'''All classes have a function called __init__(),
which is always executed when the class is being initiated
'''
class
Example1
:
def
__init__
(
self
,
name
,
age
):
self
.
name
=
name
self
.
age
=
age
e1
=
Example1
(
"Ayushi"
,
20
)
print
(
e1
.
name
)
print
(
e1
.
age
)
Back
|
FazBrowse Home
|
New Git URL