'''
시퀀스 자료형 특징
1. 원소에 순서가 있다 
2. 특정 원소를 조회할 수 있다
3. 길이를 확인할 수 있다
4. 연결 연산을 할 수 있다
5. 반복 연산을 할 수 있다
'''
#4. 연결 연산을 할 수 있다 +
print('안녕'+'하세요')
c = ['t', 'w', 'i'] + ['c', 'e']
print(c)

#5. 반복 연산을 할 수 있다 *
print('hi' * 3)
d = ['bye'] * 5
print(d)

print('----문제1-----')
print(('O' + 'X' * 2) * 2)


print('----반복문 for----')
#기본형: for 변수 in 시퀀스:
#           <반복할 명령>
#시퀀스의 길이만큼 반복된다


for i in [1, 2, 3]:
    print('*')

for i in 'abcde':
    print(i)

print('----문제2----')
menu = ['김밥', '라면', '떡볶이', '돈가스']

for item in menu:
    print(item)

# 3. 사용자 입력 받아 메뉴 확인
want = input('먹고 싶은 메뉴를 입력하세요: ')
if want in menu:
    print('메뉴에 있어요!')
else:
    print('죄송해요, 그 메뉴는 없어요.')


    

Embed on website

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