#논리형bool - True참, False거짓
#비교연산 : 두 자료를 비교할 때
print(5 > 3)
print(2 < 1)
print(5 == 5)
'''
> 크다
< 작다
== 같다
!= 같지 않다
>= 크거나 같다
<= 작거나 같다
'''
x = 10 #변수 x에 10을 저장한다
print(x == 10) #x가 10이랑 같다
print('ㄱ' > 'ㄴ')
print('-----문제1-----')
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))
print((c == 8) or (d < 12))
print('-----문제2-----')
x = 10
y = 17
z = 2
#print(x < y and z ? ?) #True
#print(x == ? or z >= 3)#True
print(not(x > y))
print(not x > y)
To embed this project on your website, copy the following code and paste it into your website's HTML: