answer = 'qwerty'
count = 0
while True:
    if count == 5:
        print('비밀번호 입력 횟수를 초과했습니다.')
        break
    pw = input('비밀번호를 입력하세요 >>> ')
    if pw == answer:
        print('비밀번호를 맞혔습니다.')
        break
    count += 1

while True:
    grade = int(input('이번 영화의 평점을 입력하세요 >>> '))
    if grade >= 1 and grade <= 5:
        print('평점: {}'.format('★' * grade))
        break
    else:
        print('평점은 1~5 사이만 입력할 수 있습니다.')

money = 10000
while True:
    print('현재 {}원이 있습니다.'.format(money))
    if money == 0:
        break
    spend = int(input('사용할 금액 입력 >>> '))
    if spend <= 0:
        print('0 이하의 금액은 사용할 수 없습니다.')
    elif spend > money:
        print('{}원이 부족합니다.'.format(spend - money))
    else:
        money -= spend

for n in range(1, 100):
    units = n % 10
    tens = n // 10
    condition1 = units % 3 == 0 and units != 0
    condition2 = tens % 3 == 0 and tens != 0 
    if condition1 and condition2:
        print('짝짝', end='\t')
    elif condition1 or condition2:
        print('짝', end='\t')
    else:
        print(n, end='\t')
    if n % 10 == 0:
        print()

exam = [99, 78, 100, 91, 81, 85, 54, 100, 71, 50]
score = [min(n + 5, 100) for n in exam]
print(score)

count = int(input('몇 개의 과일을 보관할까요? >>> '))
basket = []
for n in range(count):
    fruit = input('{}번째 과일을 입력하세요 >>> '.format(n + 1))
    basket.append(fruit)
print('입력 받은 과일들은 {}입니다.'.format(basket))

total = 0
end = int(input('임의의 양수를 입력하세요 >>> '))
for n in range(0, end + 1):
    total += n
print('1부터 {}사이 모든 정수의 합계는 {}입니다.'.format(n, total))

for n in range(5, 0, -1):
    print(n)

Total
Today
Yesterday