프로그래밍 언어/Python
양자택일 조건문(if~else문)
ruby-jieun
2023. 1. 5. 16:48
양자택일 조건문(if~else문)
- 양자택일 조건문
if~else문 : 조건식 결과에 따라 둘 중에 하나가 실행됨
passScore = 80
myScore = int(input('점수 입력 : '))
if myScore >= passScore :
print('PASS!!')
if myScore < passScore :
print('FAIL!!')
passScore = 80
myScore = int(input('점수 입력 : '))
if myScore >= passScore :
print('PASS!!')
else :
print('FAIL!!')
- pass
나중에 코딩하겠다..
messageSrting = input('문자 메세지 입력 : ')
if len(messageSrting) >= 500:
pass
else :
pass