GIAC
GPYC · Question #3
Which of the following commands would correct the error in the screenshot? >>> tcp_flags_as_str(flag): ... def tcp_flags_as_str(flag): ... tcp_flags = ['CWR', 'ECE', 'URG', 'ACK', 'PSH', 'RST'…
The correct answer is A. import itertools. You've hit your limit · resets 1pm (America/New_York)
Python Fundamentals & Command Line Tools
Question
Which of the following commands would correct the error in the screenshot?
tcp_flags_as_str(flag): ... def tcp_flags_as_str(flag): ... tcp_flags = ['CWR', 'ECE', 'URG', 'ACK', 'PSH', 'RST', 'SYN', 'FIN'] ... return "|".join(list(itertools.compress(tcp_flags,map(int,format(flag ... tcp_flags_as_str(2) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 3, in tcp_flags_as_str NameError: name 'itertools' is not defined
Options
- Aimport itertools
- Bmodular itertools
- Creturn itertools
- Ddefine itertools
How the community answered
(27 responses)- A93% (25)
- B4% (1)
- C4% (1)
Explanation
You've hit your limit · resets 1pm (America/New_York)
Topics
#import statements#modules#NameError#itertools
Community Discussion
No community discussion yet for this question.