๋ฐ์ํ

์๋ฃํ ๊ฐ์
- ์ ์(Integer)
- ์์(Floating Point)
- ๋ฌธ์์ด(String)
- ๋ถ๋ฆฐ(Boolean) : True / False
์ถ์ํ ๊ฐ์
- ์ถ์ํ(Abstraction)๋ ? ๋ณต์กํ ์๋ฃ, ๋ชจ๋, ์์คํ ๋ฑ์ผ๋ก๋ถํฐ ํต์ฌ์ ์ธ ๊ฐ๋ ๋๋ ๊ธฐ๋ฅ์ ๊ฐ์ถ๋ ค ๋ด๋ ๊ฒ
- ์ถ์ํ์ 3๋จ๊ณ : ๋ณ์(Variable), ํจ์(function), ๊ฐ์ฒด(Object)
ํจ์(Function)
- ํจ์๋ฅผ ์ง์ ์ ์ํ ์ ์์
[ ์ฝ๋ ]
def hello() : # ํจ์์ ํค๋
print("Hello!")
print("Welcome to Codeit!")
hello() # hello ํจ์ ํธ์ถ
ํ๋ผ๋ฏธํฐ
- ํ๋ผ๋ฏธํฐ๋ ํจ์์ ๋๊ฒจ ์ฃผ๋ ๊ฐ
[ ์ฝ๋ ]
def hello(name) : # ์ฌ๊ธฐ์ name์ด ํ๋ผ๋ฏธํฐ
print("Hello")
print(name)
print("Welcome to Codeit!")
hello("Chris")
[ ๊ฒฐ๊ณผ๋ฌผ ]
Hello
Chris
Welcome to Codeit!

๋ฐ์ํ