day 3-1 python (if/else 및 조건 연산자를 통한 흐름 제어)
예시 print("Welcome to the rollercoaster!") height = int(input("What is your height in cm? ")) if height > 120: # 만약에 120 보다 크다면 print("You can ride the rollercoaster!") else: print("Sorry, you have to grow taller before you can ride.") 결과 결과1 120cm 도 탈수 있게 하려면? if height > 119: ################ 또는 if height >= 120: 이것을 비교 연산자라고 한다. Operator Meaning > Greater than = Greater than or equal to
2023.02.21