#불리언 bool - True참, False거짓

#비교 연산 : 두 숫자 또는 두 식의 크기를 비교하는 과정
'''
비교 연산자
> 크다
< 작다
>= 이상(크거나 같다)
<= 이하(작거나 같다)
== 같다
!= 같지 않다
'''
# = vs ==
x = 10 #변수 x에 10을 저장한다
print(x == 10) #변수 x와 10이 같다

a = 10
b = 3
print(a != b) #True
print(a == b) #False

#논리 연산
'''
논리 연산자
and : 모든 논리가 참일 때 참
or : 하나라도 참이면 참
not : 논리를 반대로 
'''
c = 7
d = 15
print((c < 10) and (d >= 10)) #True
print((c == 8) or (d >= 12)) #True
print(not(c > 5)) #False








Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: