Page not loading? Try clicking here.
Placeholder

#746
Language restricted

연산자 - 자가진단 5 1s 8MB

Problems

세 변수 a, b, c에 각각 True, True, False를 저장하고, 아래 연산식의 결과를 각 줄에 순서대로 출력하는 프로그램을 작성하라.

 

- not a

- a and b

- a or b

- a and (b or c)

- a or (b and c)

- not a or (b and not c)​

 

* 출력 예의 "???"로 표시된 부분은 여러분들의 연습을 위해 남겨 두었다. 각 줄에 출력 되는 논리는 직접 계산한 결과와 프로그램의 계산 결과가 일치하는지 확인해 본다.


Example

False

True
???
???
???
???

Source

자기주도 파이썬

You must sign in to write code.