MapleStory Finger Point

πŸ’Ž Python/πŸ“šνŒŒμ΄μ¬ for Beginner (2판)

(κ°œλ…) λ³€μˆ˜ μ„ μ–Έ, μ‚¬μš© - 파이썬 for Beginner (2판)

HYEJU01 2024. 3. 18. 19:59

 

· λ³€μˆ˜

μ–΄λ–€ 값을 μ €μž₯ν•˜λŠ” λ©”λͺ¨λ¦¬ 곡간

 

· λ³€μˆ˜ 4가지

- λΆˆν˜• Boolean (True, False)

- μ •μˆ˜ν˜• intVar

- μ‹€μˆ˜ν˜• floatVar- λ¬Έμžμ—΄ strVar

 

· λ³€μˆ˜ κ·œμΉ™

λŒ€μ†Œλ¬Έμž ꡬ뢄

문자,숫자,언더바 포함 κ°€λŠ₯

숫자둜 μ‹œμž‘ν•˜λ©΄ μ•ˆλ¨

μ˜ˆμ•½μ–΄λŠ” λ³€μˆ˜λ‘œ μ‚¬μš© μ•ˆλ¨ ( True , False λ“±λ“±)

 

 

· λ³€μˆ˜ λŒ€μž…

λ³€μˆ˜μ˜ μ„ μ–Έ 없이 μ‚¬μš©κ°€λŠ₯ !

var2 = 200
var1 = var2


var1 = 100+200


var = var2 + 100


var1 = var2 = var3 = var4 =100


var1 = var1 + 200
## var1 κ°’ μ΄ˆκΈ°ν™” ν•„μˆ˜ ##

 

 

· λ³€μˆ˜μ— λ‹€λ₯Έ νƒ€μž… λŒ€μž…

κΈ°μ‘΄ λ³€μˆ˜μ— λ‹€λ₯Έ νƒ€μž…μ˜ 값을 λ„£μœΌλ©΄ κ·Έ λ³€μˆ˜μ˜ ν˜•μ΄ λ³€κ²½λœλ‹€.

myVar = 100
type(myVar)  ##int##

myVar = 100.0
type(myVar) ##float##

 

 

· λŒ€μž…μ—°μ‚°μž

λŒ€μž… μ—°μ‚°μž μ™Όμͺ½μ—λŠ” λ³€μˆ˜λ§Œ 올 수 μžˆλ‹€.