#내장함수
'''
print()
input()
type()
len()
int(), str() 자료형 변환
sum() 숫자들의 합 구하기
max() 최대값 찾기
min() 최솟값 찾기
'''
print(max('apple'))
print(min([1, 2, 3]))
print(min(('가', '나', '다')))

print(sum([1, 2, 3]))

#메서드 : 특정 자료에 .을 찍어서 사용
'''
문자열 메서드
lower() 전부 소문자
upper() 전부 대문자
find(a) a가 처음 나오는 인덱스를 출력, 없으면 -1
replace(a, b) a를 b로 바꾼다
split(a) a를 기준으로 나눈다
'''
t = 'Python is Fun'
print(t.lower())
print(t.upper())
print(t.find('Is'))
print(t.replace(' ', '-'))
print(t.split())

print('----문제----')
'''
비밀 메시지: zpythqnZzisXcqqlz
1. 모두 소문자로 바꾸고,
2. z, x를 공백(띄어쓰기)으로 바꾼다
3. u를 o로 바꾼다
'''
msg = "zpythqnZxisXcqqlz"

# 1. 모두 소문자로 바꾸기
msg = msg.lower()

# 2. z, x → 공백으로 바꾸기
msg = msg.replace('z', ' ')
msg = msg.replace('x', ' ')
msg = msg.replace('q', 'o')

print(msg)

msg = msg.split()
print(msg[2])





Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: