What is the cyclomatic complexity below?
(A) 4
(B) 5
(C) 6
#!python
def func(x):
        if x==0:
                return 3
        elif x==1:
                return 4
        elif  x==2:
                return 5
        else:
                return 0
Tuesday, July 31, 2007
Exercise of cyclomatic complexity
Posted by
Software Engineering Notes
at
1:07 AM
 
Subscribe to:
Post Comments (Atom)
1 comment:
Post a Comment