Aiffel: Day 2

Hyunji Kim·2021년 12월 29일
0

Aiffel

목록 보기
1/10

아침에 구글밋으로 입실 후 개더타운에 모여 오전: Aiffel LMS로 학습, 오후: 파이썬마스터 (파이썬 코딩 도장) 진행하였음!

Aiffel LMS

Fundamental 6. 파이썬으로 코딩 시작하기

파이썬 코딩 도장

Unit 13. if 조건문으로 특정 조건일 때 코드 실행하기

Unit 14. else를 사용하여 두 방향으로 분기하기

실습문제!

Korean = int(input())
English = int(input())
Math = int(input())
Science = int(input())

if Korean > 100 or English > 100 or Math > 100 or Science > 100:
    print('잘못된 점수')
else:
    avg = (Korean + English + Math + Science) / 4
    if avg >= 80:
        print('합격')
    else:
        print('불합격')

Unit 15. elif를 사용하여 여러 방향으로 분기하기

실습문제!

age = int(input())
balance = 9000    # 교통카드 잔액

if 7<= age <= 12:
    balance = balance - 650
elif 13<= age <= 18:
    balance = balance - 1050
elif 19 <= age:
    balance = balance - 1250

print(balance)

0개의 댓글

관련 채용 정보

Powered by GraphCDN, the GraphQL CDN