#논리형bool - True참, False거짓
print('-----비교연산-----')
#비교연산 : 두 자료를 비교할 때
'''
비교연산자
> 크다
< 작다
== 같다
!= 같지 않다
>= 크거나 같다
<= 작거나 같다
'''
print(5 > 3)
print(2 < 1)
print(5 != 5)
print('-----문제1-----')
a = 10
b = 3
#print(a ? b) #True
#print(a ? b) #False
print('-----논리연산----')
#논리연산 : 여러 개의 비교연산을 연결해서 사용
'''
논리연산자
and : 둘 다 참일때 참
or : 하나라도 참이면 참
not : 값을 반대로
'''
c = 7
d = 15
print(c < 10 and d > 10)
print(c == 8 or d < 12)
print(not(c < 10))
print('-----문제2-----')
x = 11
y = 17
z = 2
print(x < y and z ? 10) #True
print(x == ? or z >= 3) #True
To embed this project on your website, copy the following code and paste it into your website's HTML: