RUBY
양자택일 조건문(if~else문) 본문
양자택일 조건문(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
'프로그래밍 언어 > Python' 카테고리의 다른 글
다자택일 조건문 (0) | 2023.01.05 |
---|---|
if~else문과 조건식 (0) | 2023.01.05 |
조건문(if문) (0) | 2023.01.04 |
조건식 (0) | 2023.01.04 |
Operator 모듈 (0) | 2023.01.04 |
Comments