Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Archives
Today
Total
관리 메뉴

RUBY

양자택일 조건문(if~else문) 본문

프로그래밍 언어/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

'프로그래밍 언어 > 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