다음 파이썬 코드에 해당하는 결합도(coupling)는?
a = 0
b = 0
def getinput():
c = int(input("숫자 입력? "))
return c
def getadd():
c = a + b
return c
def main():
global a
global b
a = getinput()
b = getinput()
c = getadd()
print("{} + {} = {}".format(a, b, c))
main()- ①스탬프(stamp) 결합도
- ②제어(control) 결합도
- ③공통(common) 결합도
- ④내용(content) 결합도
선지를 골라 바로 채점해 보세요.
정답 ③
출처: 인사혁신처 공개 기출(공공데이터포털, 이용허락 제한 없음)