λ°μν
Notice
Recent Posts
Recent Comments
Link
μΌ | μ | ν | μ | λͺ© | κΈ | ν |
---|---|---|---|---|---|---|
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 |
29 | 30 |
Tags
- μ΄κ²μ΄ μ·¨μ μ μν μ½λ©ν μ€νΈλ€
- λΈλΌμ°μ μ€ν
- jdbc
- νμ λ³μ
- μλ°
- μμ΄
- μ΄μ§μ λ³ν
- sql
- νλ‘κ·Έλλ¨Έμ€
- Do_it
- matplotlib
- λ°±μ€
- ν©ν λ¦¬μΌ μ§λ²
- 2BPerfect
- μ΅μ
- mysql
- dacon
- μ°Έμ‘° λ³μ
- PYTHON
- DFS
- java
- MacOS
- μ§ κ° μμΈ‘ λΆμ
- np.zeros_like
- Do it
- μ ν ν¬ νμ΄μ¬
- BFS
- λ€μ΅μ€νΈλΌ μκ³ λ¦¬μ¦
- λ°μ€κ·Έλν
- Extended Slices
Archives
- Today
- Total
π¦ κ³΅λ£‘μ΄ λμ!
2BPerfect...6 λ³Έλ¬Έ
κ°μ²΄μ ν΄λμ€
## μ μ λ©μλ
μ μ λ©μλλ ν΄λμ€μ κ΄λ ¨μ΄ μμ΄μ ν΄λμ€ μμ λκΈ°λ νμ§λ§ ν΄λμ€λ
ν΄λμ€μ μΈμ€ν΄μ€μλ 무κ΄νκ² λ
립μ μΌλ‘ λμνλ ν¨μλ₯Ό λ§λ€κ³ μΆμλ μ΄μ©
ν¨μλ₯Ό μ μν λ μΈμλ‘ selfμ¬μ© x μ μ λ©μλ μμμ μΈμ€ν΄μ€ λ©μλλ
λ³μμ μ κ·Όν μ μλ€. ν¨μ μμ λ°μ½λ μ΄ν°μΈ @staticmethodλ₯Ό μ μΈνμ¬ μ μ λ©μλ νν
class Car():
def __init__(self,size,color):
def move(self,speed):
def auto_cruise(self):
## μ μ λ©μλ μμ
@staticmethod
def check_type(model_code):
if(model_code>=20):
print('μ΄ μλμ°¨λ μ κΈ°μ°¨μ
λλ€.')
elif(10<=model_code<20):
print('μ΄ μλμ°¨λ κ°μλ¦°μ°¨μ
λλ€.')
else:
print('μ΄ μλμ°¨λ λμ €μ°¨μ
λλ€.')
## ν΄λμ€ λ©μλ
@classmethod
def count_instance(cls):
print('μλμ°¨ κ°μ²΄μ κ°μ :{0}'.format(cls.instance_count))
ν΄λμ€ λ©μλλ ν΄λμ€ λ³μλ₯Ό μ¬μ©νκΈ° μν ν¨μ
ν΄λμ€ λ©μλλ ν¨μλ₯Ό μ μν λ 첫 λ²μ§Έ μΈμλ‘ ν΄λμ€λ₯Ό λ겨λ°λ clsκ° νμ
ν΄λμ€ λ©μλλ₯Ό μ¬μ©νκΈ° μν΄μλ @classmethodλ₯Ό μ§μ ν΄μΌν¨
ν΄λμ€ λ©μλλ μμ±λ κ°μ²΄μ κ°μλ₯Ό λ°ννλ λ± ν΄λμ€ μ 체μμ κ΄λ¦¬ν΄μΌ ν κΈ°λ₯μ΄ μμ λ
μ£Όλ‘ μ΄μ©
λ°μν
'Development > Python' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
2BPerfect...8 (0) | 2022.01.25 |
---|---|
2BPerfect...7 (0) | 2022.01.24 |
2BPerfect...5 (0) | 2022.01.24 |
2BPerfect...4 (0) | 2022.01.24 |
2BPerfect...3 (0) | 2022.01.22 |
Comments