Guidelines

λŒ€μ†Œλ¬Έμž λ³€ν™˜ λ©”μ†Œλ“œ upper()와 lower()

λ¬Έμžμ—΄ "apple"을 "APPLE"둜, "APPLE"을 "apple"둜 ν•œ λ²ˆμ— λ³€ν™˜ν•˜λ €λ©΄ μ–΄λ–»κ²Œ ν•΄μ•Ό ν• κΉŒμš”?

νŒŒμ΄μ¬μ€ λ¬Έμžμ—΄μ˜ λŒ€μ†Œλ¬Έμžλ₯Ό λ³€ν™˜ν•˜λŠ” ν•¨μˆ˜μΈ upper()와 lower()λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€.


λŒ€μ†Œλ¬Έμž λ³€ν™˜ λ©”μ†Œλ“œμ˜ μ‚¬μš©

upper() λ©”μ†Œλ“œλŠ” λ¬Έμžμ—΄μ˜ λͺ¨λ“  문자λ₯Ό λŒ€λ¬Έμžλ‘œ λ³€ν™˜ν•˜κ³ , lower() λ©”μ†Œλ“œλŠ” λͺ¨λ“  문자λ₯Ό μ†Œλ¬Έμžλ‘œ λ³€ν™˜ν•©λ‹ˆλ‹€.

λŒ€μ†Œλ¬Έμž λ³€ν™˜ μ˜ˆμ‹œ
text = "Hello World!" upper_text = text.upper() # HELLO WORLD! print("upper_text:", upper_text) lower_text = text.lower() # hello world! print("lower_text:", lower_text)

λŒ€μ†Œλ¬Έμž λ³€ν™˜μ€ μ–Έμ œ ν•„μš”ν• κΉŒμš”?

ν”„λ‘œκ·Έλž˜λ°μ—μ„œ λŒ€μ†Œλ¬Έμž λ³€ν™˜μ€ μ •κ·œν™”λ₯Ό 톡해 μ‚¬μš©μžκ°€ μž…λ ₯ν•œ 데이터λ₯Ό ν‘œμ€€ ν˜•μ‹μœΌλ‘œ λ³€ν™˜ν•  λ•Œ 주둜 μ‚¬μš©λ©λ‹ˆλ‹€.

μ •κ·œν™”λž€? : μ •κ·œν™”λŠ” 데이터λ₯Ό μΌκ΄€λœ ν˜•νƒœλ‘œ λ³€ν™˜ν•˜λŠ” 과정을 λœ»ν•©λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ ν…μŠ€νŠΈλ₯Ό 비ꡐ할 λ•Œ λͺ¨λ“  문자λ₯Ό μ†Œλ¬Έμžλ‘œ λ°”κΎΈκ±°λ‚˜, 곡백을 μ œκ±°ν•˜λŠ” λ“±μ˜ μž‘μ—…μ„ μˆ˜ν–‰ν•˜λŠ” 것이 μ •κ·œν™”μž…λ‹ˆλ‹€.


데이터 μ •κ·œν™” μ˜ˆμ‹œ
user_input = "PyThOn" standardized_input = user_input.lower() if standardized_input == "python": print("μΌμΉ˜ν•©λ‹ˆλ‹€!") else: print("λΆˆμΌμΉ˜ν•©λ‹ˆλ‹€.")
Mission
0 / 1

νŒŒμ΄μ¬μ—μ„œ λ¬Έμžμ—΄μ˜ λͺ¨λ“  문자λ₯Ό λŒ€λ¬Έμžλ‘œ λ³€ν™˜ν•˜λŠ” ν•¨μˆ˜λŠ” λ¬΄μ—‡μΈκ°€μš”?

capitalize()

title()

upper()

lower()

Guidelines

AI Tutor

Publish

Design

Upload

Notes

Favorites

Help

Code Editor

Run
Generate

Execution Result